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

for "." and "..", since listdir() no longer returns those.
This commit is contained in:
Guido van Rossum 2000-02-29 13:31:16 +00:00
parent 1b6d21bb3e
commit a9b2b4be26
1 changed files with 0 additions and 2 deletions

View File

@ -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]):