From ad8214d2165f27d924a1320baf2520ca76872f96 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 10 Jan 2025 10:37:30 +0000 Subject: [PATCH] RuntimeError exceptions during assets processing must be fatal --- scraper/src/mindtouch2zim/asset.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scraper/src/mindtouch2zim/asset.py b/scraper/src/mindtouch2zim/asset.py index 7b6c482..bb00918 100644 --- a/scraper/src/mindtouch2zim/asset.py +++ b/scraper/src/mindtouch2zim/asset.py @@ -159,6 +159,10 @@ def process_asset( content=asset_content.getvalue(), ) break # file found and added + except RuntimeError: + # RuntimeError exceptions comes from the libzim usually and they must be + # fatal errors + raise except KnownBadAssetFailedError as exc: logger.debug(f"Ignoring known bad asset: {exc}") except Exception as exc: