]> granicus.if.org Git - python/commitdiff
Remove obsolete 'rU' mode in Tools/scripts too (see be5b8d1ded34)
authorÉric Araujo <merwok@netwok.org>
Thu, 5 May 2011 18:18:16 +0000 (20:18 +0200)
committerÉric Araujo <merwok@netwok.org>
Thu, 5 May 2011 18:18:16 +0000 (20:18 +0200)
Tools/scripts/findnocoding.py
Tools/scripts/pysource.py

index 77607ce137081fa313ae5e15a4214dbaddcbcbf8..c42fa7cfa3e0cc2093988575d7c328929632c10a 100755 (executable)
@@ -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
 
index 048131e2433a5f7094a9923fb890e78ac3fd88be..c7dbe605d49b2109498b4a37be10be43086c2f78 100644 (file)
@@ -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