Fixed a bug in os.walk() with bytes path on Windows caused by merging fixes

for issues #25995 and #25911.
This commit is contained in:
Serhiy Storchaka 2016-02-24 13:03:54 +02:00
parent 205e75bb62
commit e14c07e4e4

View file

@ -369,7 +369,7 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
# Note that scandir is global in this module due
# to earlier import-*.
scandir_it = scandir(top)
entries = list(scandir(top))
entries = list(scandir_it)
except OSError as error:
if onerror is not None:
onerror(error)