summaryrefslogtreecommitdiff
path: root/coverage/python.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-05 14:48:41 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-05 14:48:41 -0500
commitd1c92d8e6b066a7b16d625b566853821afe8b46c (patch)
tree0f16a26e769aa4ee5e9888806152d7a78645a8c4 /coverage/python.py
parentbc31b68776bb76ac9a650caa3c7a04c84817093d (diff)
downloadpython-coveragepy-git-d1c92d8e6b066a7b16d625b566853821afe8b46c.tar.gz
Fix another form-feed problem, #461
Diffstat (limited to 'coverage/python.py')
-rw-r--r--coverage/python.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/python.py b/coverage/python.py
index 5e563828..07d23472 100644
--- a/coverage/python.py
+++ b/coverage/python.py
@@ -50,6 +50,8 @@ def get_python_source(filename):
# Couldn't find source.
raise NoSource("No source for code: '%s'." % filename)
+ # Replace \f because of http://bugs.python.org/issue19035
+ source = source.replace(b'\f', b' ')
source = source.decode(source_encoding(source), "replace")
# Python code should always end with a line with a newline.