From e14c07e4e469a91d74546db9980699b4fbed03db Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 24 Feb 2016 13:03:54 +0200 Subject: [PATCH] Fixed a bug in os.walk() with bytes path on Windows caused by merging fixes for issues #25995 and #25911. --- Lib/os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/os.py b/Lib/os.py index a49e7ce4560..e32cd6be32e 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)