From 01326050d3237fd1339a04637174bfd2bf35dfa5 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Mon, 9 May 2022 18:28:31 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ALTO:=20Handle=20PermissionErrors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/modstool/altotool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qurator/modstool/altotool.py b/qurator/modstool/altotool.py index 2bd73c1..66fac8c 100755 --- a/qurator/modstool/altotool.py +++ b/qurator/modstool/altotool.py @@ -79,7 +79,10 @@ def walk(m): if f.is_file() and not f.name.startswith('.'): yield f.path 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: yield m.path