From c81ec323301b9aa8cc46016a1eedcf0327973f46 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Tue, 19 Sep 2023 23:48:00 +0200 Subject: [PATCH] display type of skipped contribution attachments (e.g. "link") --- indico-fetcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indico-fetcher.py b/indico-fetcher.py index 1afa24b..f7c2249 100755 --- a/indico-fetcher.py +++ b/indico-fetcher.py @@ -115,7 +115,7 @@ def exec_request(indico_instance, request_path): mtime = dateutil.parser.parse(mod) mtimets = int(time.mktime(mtime.timetuple())) if attachment['type'] != 'file': - print('Skipping non-file attachment...') + print(f"Skipping non-file attachment (type: {attachment['type']})...") continue # Remove any bad characters from filenames: sanitized_filename = re.sub('[^\w\.\s-]', '', attachment['filename'])