summaryrefslogtreecommitdiffstats
path: root/Lib/trace.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-04-16 03:28:19 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-04-16 03:28:19 (GMT)
commitc00fc8452e1ce89ede278f417a2bd272bda98eae (patch)
treee917b152baaba22755435f30d83b56e05404388b /Lib/trace.py
parent10659f2540bc1f05dfce8dd28c93610283cb7349 (diff)
downloadcpython-c00fc8452e1ce89ede278f417a2bd272bda98eae.zip
cpython-c00fc8452e1ce89ede278f417a2bd272bda98eae.tar.gz
cpython-c00fc8452e1ce89ede278f417a2bd272bda98eae.tar.bz2
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 9263ace..b104ff0 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))