diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-04 13:55:36 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-04 13:55:36 +0200 |
commit | 4e86d5b88d96305a31a3acae5cea53824f4e8d21 (patch) | |
tree | 7b9022afb966e93c1ecac9dd3147365d9321a657 /Lib/pkgutil.py | |
parent | 35b300c5fd8406c0e05bc2a1e7e07e6db848571e (diff) | |
download | cpython-git-4e86d5b88d96305a31a3acae5cea53824f4e8d21.tar.gz |
Replace open(filename, 'rU') by open(filename, 'r')
The U flag is no more used (but still accepted for backward compatibility).
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index b48627565c..b0cefee34c 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -248,7 +248,7 @@ class ImpLoader: if self.file and self.file.closed: mod_type = self.etc[2] if mod_type==imp.PY_SOURCE: - self.file = open(self.filename, 'rU') + self.file = open(self.filename, 'r') elif mod_type in (imp.PY_COMPILED, imp.C_EXTENSION): self.file = open(self.filename, 'rb') @@ -293,7 +293,7 @@ class ImpLoader: self.file.close() elif mod_type==imp.PY_COMPILED: if os.path.exists(self.filename[:-1]): - f = open(self.filename[:-1], 'rU') + f = open(self.filename[:-1], 'r') self.source = f.read() f.close() elif mod_type==imp.PKG_DIRECTORY: |