[Python-checkins] cpython: Remove obsolete 'rU' mode in Tools/scripts too (see be5b8d1ded34)
eric.araujo
python-checkins at python.org
Thu May 26 16:51:43 CEST 2011
http://hg.python.org/cpython/rev/6d9cb906c85e
changeset: 70404:6d9cb906c85e
parent: 69852:b06d7aa8ac20
user: Éric Araujo <merwok at netwok.org>
date: Thu May 05 20:18:16 2011 +0200
summary:
Remove obsolete 'rU' mode in Tools/scripts too (see be5b8d1ded34)
files:
Tools/scripts/findnocoding.py | 4 ++--
Tools/scripts/pysource.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py
--- a/Tools/scripts/findnocoding.py
+++ b/Tools/scripts/findnocoding.py
@@ -2,7 +2,7 @@
"""List all those Python files that require a coding directive
-Usage: nocoding.py dir1 [dir2...]
+Usage: findnocoding.py dir1 [dir2...]
"""
__author__ = "Oleg Broytmann, Georg Brandl"
@@ -50,7 +50,7 @@
def needs_declaration(fullpath):
try:
- infile = open(fullpath, 'rU')
+ infile = open(fullpath)
except IOError: # Oops, the file was removed - ignore it
return None
diff --git a/Tools/scripts/pysource.py b/Tools/scripts/pysource.py
--- a/Tools/scripts/pysource.py
+++ b/Tools/scripts/pysource.py
@@ -42,7 +42,7 @@
return None
try:
- return open(fullpath, 'rU')
+ return open(fullpath)
except IOError as err: # Access denied, or a special file - ignore it
print_debug("%s: access denied: %s" % (fullpath, err))
return None
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list