From: Serhiy Storchaka Date: Wed, 24 Feb 2016 11:03:54 +0000 (+0200) Subject: Fixed a bug in os.walk() with bytes path on Windows caused by merging fixes X-Git-Tag: v3.6.0a1~577^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e14c07e4e469a91d74546db9980699b4fbed03db;p=thirdparty%2FPython%2Fcpython.git Fixed a bug in os.walk() with bytes path on Windows caused by merging fixes for issues #25995 and #25911. --- diff --git a/Lib/os.py b/Lib/os.py index a49e7ce45603..e32cd6be32e6 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -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)