From d26146de7f1b76e9f212492dd80677f16bd00cc0 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 1 Nov 2018 11:54:10 +0900 Subject: [PATCH] platform_utils: Fix exception handling in _walk_windows_impl Change-Id: I6b79cbc4c1bbbe17ffe8361fe1544434beaa9059 --- platform_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform_utils.py b/platform_utils.py index b2cc2459..8af25d21 100644 --- a/platform_utils.py +++ b/platform_utils.py @@ -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