ALTO: Handle PermissionErrors

master
Gerber, Mike 3 years ago
parent 10b8023dd6
commit 01326050d3

@ -79,7 +79,10 @@ def walk(m):
if f.is_file() and not f.name.startswith('.'):
yield f.path
elif f.is_dir():
try:
yield from walk(f.path)
except PermissionError:
warnings.warn(f"Error walking {f.path}")
else:
yield m.path

Loading…
Cancel
Save