Open file in universal newline mode when passing to compile(). Solution
from Felix Wiemann. Closes patch #934971.
This commit is contained in:
parent
10659f2540
commit
c00fc8452e
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue