platform_utils: Fix exception handling in _walk_windows_impl

Change-Id: I6b79cbc4c1bbbe17ffe8361fe1544434beaa9059
This commit is contained in:
David Pursehouse 2018-11-01 11:54:10 +09:00
parent bd8f658823
commit d26146de7f

View File

@ -313,7 +313,7 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
def _walk_windows_impl(top, topdown, onerror, followlinks):
try:
names = listdir(top)
except error, err:
except Exception as err:
if onerror is not None:
onerror(err)
return