1
0
Fork 0
mirror of https://github.com/qurator-spk/modstool.git synced 2025-06-09 11:49:55 +02:00

ALTO: Handle PermissionErrors

This commit is contained in:
Gerber, Mike 2022-05-09 18:28:31 +02:00
parent 10b8023dd6
commit 01326050d3

View file

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