From df9c7b2a113b4e584903e5e7b384bdd03c2d9742 Mon Sep 17 00:00:00 2001 From: Jarno Bakker Date: Tue, 23 Jul 2024 14:37:54 +0200 Subject: [PATCH] ignore broad exception catch It's necessary to let the import continue with the rest of the files in case an unexpected exception occurs. We log what happens. --- src/import/test_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/import/test_import.py b/src/import/test_import.py index 2943e7a..eed68d5 100755 --- a/src/import/test_import.py +++ b/src/import/test_import.py @@ -104,7 +104,9 @@ def process_bulk(filenames): for filename in filenames: try: articles.append(Article.from_file(filename)) + # pylint: disable=broad-exception-caught except Exception as e: + # pylint: enable=broad-exception-caught print(f"Failed to parse file '{filename}'") print(e)