Commit c00fc845 authored by Skip Montanaro's avatar Skip Montanaro

Open file in universal newline mode when passing to compile(). Solution

from Felix Wiemann.  Closes patch #934971.
parent 10659f25
......@@ -418,7 +418,7 @@ def find_executable_linenos(filename):
"""Return dict where keys are line numbers in the line number table."""
assert filename.endswith('.py')
try:
prog = open(filename).read()
prog = open(filename, "rU").read()
except IOError, err:
print >> sys.stderr, ("Not printing coverage data for %r: %s"
% (filename, err))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment