diff options
author | Skip Montanaro <skip@pobox.com> | 2004-04-16 03:28:19 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2004-04-16 03:28:19 (GMT) |
commit | c00fc8452e1ce89ede278f417a2bd272bda98eae (patch) | |
tree | e917b152baaba22755435f30d83b56e05404388b /Lib | |
parent | 10659f2540bc1f05dfce8dd28c93610283cb7349 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/trace.py | 2 |
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)) |