mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00: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
1 changed files with 0 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue