mirror of https://github.com/python/cpython.git
Patch by Gerrit Holl to avoid doing two stat() calls in a row in walk().
This commit is contained in:
parent
0ba33002e1
commit
84a74595f7
|
@ -267,7 +267,8 @@ def walk(top, func, arg):
|
|||
for name in names:
|
||||
if name not in exceptions:
|
||||
name = join(top, name)
|
||||
if isdir(name) and not islink(name):
|
||||
st = os.lstat(name)
|
||||
if stat.S_ISDIR(st[stat.ST_MODE]):
|
||||
walk(name, func, arg)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue