summaryrefslogtreecommitdiff
path: root/Lib/imputil.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-06-28 23:32:51 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2002-06-28 23:32:51 +0000
commit3c513604c411f8e9409ac2046ff45d2fef9cdef9 (patch)
tree2845abf6e6b1e2382cda0915effd586de631f5be /Lib/imputil.py
parent15cf5f2db60c20479bd37e0fc4f6920cc4bf3657 (diff)
downloadcpython-3c513604c411f8e9409ac2046ff45d2fef9cdef9.tar.gz
Close SF patch 523944: importing modules with foreign newlines.
Didn't use the patch, because universal newlines support made it easy. It might be worth fixing the actual problem in the 2.2 maintenance branch, in which case the patch is still needed.
Diffstat (limited to 'Lib/imputil.py')
-rw-r--r--Lib/imputil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imputil.py b/Lib/imputil.py
index 5d462f1692..04111dcaa6 100644
--- a/Lib/imputil.py
+++ b/Lib/imputil.py
@@ -410,7 +410,7 @@ def _compile(pathname, timestamp):
saved back to the filesystem for future imports. The source file's
modification timestamp must be provided as a Long value.
"""
- codestring = open(pathname, 'r').read()
+ codestring = open(pathname, 'rU').read()
if codestring and codestring[-1] != '\n':
codestring = codestring + '\n'
code = __builtin__.compile(codestring, pathname, 'exec')