Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c00fc84

Browse files
author
Skip Montanaro
committed
Open file in universal newline mode when passing to compile(). Solution
from Felix Wiemann. Closes patch #934971.
1 parent 10659f2 commit c00fc84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def find_executable_linenos(filename):
418418
"""Return dict where keys are line numbers in the line number table."""
419419
assert filename.endswith('.py')
420420
try:
421-
prog = open(filename).read()
421+
prog = open(filename, "rU").read()
422422
except IOError, err:
423423
print >> sys.stderr, ("Not printing coverage data for %r: %s"
424424
% (filename, err))

0 commit comments

Comments
 (0)