summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-05-26 14:35:14 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-05-26 14:35:14 (GMT)
commitf46676d48fe0e06ee76c6158cb915c20e8751ced (patch)
treebd77e24b11f2a378e60ff432ef9f0330dfb3f82f /Tools
parent92236e5651ade38b31281ed92e2c2846f8ccd0d8 (diff)
parentaa1ef2d735772b7a4c4b4164998da2883208ea48 (diff)
downloadcpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.zip
cpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.tar.gz
cpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.tar.bz2
Branch merge
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/findnocoding.py4
-rw-r--r--Tools/scripts/pysource.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py
index 77607ce..c42fa7c 100755
--- 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 has_correct_encoding(text, codec):
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
index 048131e..c7dbe60 100644
--- a/Tools/scripts/pysource.py
+++ b/Tools/scripts/pysource.py
@@ -42,7 +42,7 @@ def _open(fullpath):
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