diff options
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r-- | Lib/posixpath.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 223d6ba..6bf40f8 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -269,7 +269,10 @@ def walk(top, func, arg): func(arg, top, names) for name in names: name = join(top, name) - st = os.lstat(name) + try: + st = os.lstat(name) + except os.error: + continue if stat.S_ISDIR(st[stat.ST_MODE]): walk(name, func, arg) |