summaryrefslogtreecommitdiff
path: root/Lib/trace.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-04-16 03:28:19 +0000
committerSkip Montanaro <skip@pobox.com>2004-04-16 03:28:19 +0000
commit01213adde79ebe087ab5118ee70e32e45c8f4087 (patch)
treec93228898d0e78178a650d0224008e2fe7af4499 /Lib/trace.py
parent3d7e95b6754027d6da4dcf71be725453a3e5754f (diff)
downloadcpython-01213adde79ebe087ab5118ee70e32e45c8f4087.tar.gz
Open file in universal newline mode when passing to compile(). Solution
from Felix Wiemann. Closes patch #934971.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r--Lib/trace.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index 9263aceb8b..b104ff085b 100644
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -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))