mirror of https://github.com/python/cpython.git
Branch merge
This commit is contained in:
commit
0f67a99fc9
|
@ -129,6 +129,10 @@ empty, and the path manipulations are skipped; however the import of
|
||||||
unless the :program:`python` interpreter was started with the :option:`-S`
|
unless the :program:`python` interpreter was started with the :option:`-S`
|
||||||
flag.
|
flag.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.3
|
||||||
|
This function used to be called unconditionnally.
|
||||||
|
|
||||||
|
|
||||||
.. function:: addsitedir(sitedir, known_paths=None)
|
.. function:: addsitedir(sitedir, known_paths=None)
|
||||||
|
|
||||||
Adds a directory to sys.path and processes its pth files.
|
Adds a directory to sys.path and processes its pth files.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
"""List all those Python files that require a coding directive
|
"""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"
|
__author__ = "Oleg Broytmann, Georg Brandl"
|
||||||
|
@ -50,7 +50,7 @@ def has_correct_encoding(text, codec):
|
||||||
|
|
||||||
def needs_declaration(fullpath):
|
def needs_declaration(fullpath):
|
||||||
try:
|
try:
|
||||||
infile = open(fullpath, 'rU')
|
infile = open(fullpath)
|
||||||
except IOError: # Oops, the file was removed - ignore it
|
except IOError: # Oops, the file was removed - ignore it
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ def _open(fullpath):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return open(fullpath, 'rU')
|
return open(fullpath)
|
||||||
except IOError as err: # Access denied, or a special file - ignore it
|
except IOError as err: # Access denied, or a special file - ignore it
|
||||||
print_debug("%s: access denied: %s" % (fullpath, err))
|
print_debug("%s: access denied: %s" % (fullpath, err))
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue