Commit a9b2b4be authored by Guido van Rossum's avatar Guido van Rossum

Remove some redundant logic from walk() -- there's no need to check

for "." and "..", since listdir() no longer returns those.
parent 1b6d21bb
......@@ -263,9 +263,7 @@ of all the files and subdirs in directory "d".
except os.error:
return
func(arg, top, names)
exceptions = ('.', '..')
for name in names:
if name not in exceptions:
name = join(top, name)
st = os.lstat(name)
if stat.S_ISDIR(st[stat.ST_MODE]):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment