#1696393: don't check for '.' and '..' in ntpath.walk since
they aren't returned from os.listdir anymore. Reported by Michael Haggerty.
This commit is contained in:
parent
94da1d6a21
commit
e2a902c669
|
@ -254,12 +254,10 @@ def walk(top, func, arg):
|
|||
except os.error:
|
||||
return
|
||||
func(arg, top, names)
|
||||
exceptions = ('.', '..')
|
||||
for name in names:
|
||||
if name not in exceptions:
|
||||
name = join(top, name)
|
||||
if isdir(name):
|
||||
walk(name, func, arg)
|
||||
name = join(top, name)
|
||||
if isdir(name):
|
||||
walk(name, func, arg)
|
||||
|
||||
|
||||
# Expand paths beginning with '~' or '~user'.
|
||||
|
|
Loading…
Reference in New Issue