From e7d9b60737c8ffd21d3be5651d84bdf07a11b3d8 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 16 Oct 2026 11:14:02 +0000 Subject: [PATCH] Do not silently discard errors raised while finishing a ZIM Creator.finish() caught and dropped every RuntimeError raised by libzim's finishZimCreation(), including genuine finalization failures, so a scraper could exit successfully (code 0) with no final ZIM file and no error logged. Track whether finish() already ran instead, so a second call stays a no-op but a real error on the first call now propagates. --- CHANGELOG.md | 1 + src/zimscraperlib/zim/creator.py | 11 +++++++---- tests/zim/test_zim_creator.py | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b260efc1..c1edec26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Keep URL-encoded `#` characters of the path or querystring when rewriting document URIs, instead of dropping everything after them (#341) - Rewrite the `poster` attribute (e.g. of `