mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
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:
parent
1b6d21bb3e
commit
a9b2b4be26
@ -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]):
|
||||
|
Loading…
Reference in New Issue
Block a user