From ae85c0d1414b7267dbd893f3decd59aed943be3d Mon Sep 17 00:00:00 2001 From: Daniel K Date: Thu, 12 Dec 2024 07:56:17 -0800 Subject: [PATCH] hotfix: regression on document generation caused by invalid html.close on weasyprint --- CHANGELOG.md | 1 + modules/documents/karrio/server/documents/generator.py | 2 +- modules/documents/setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab6ae043..cb9bebff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fix - hotfix: `ups` delivery confirmation data mapping +- hotfix: regression on document generation caused by invalid html.close on weasyprint # Karrio 2024.12rc4 diff --git a/modules/documents/karrio/server/documents/generator.py b/modules/documents/karrio/server/documents/generator.py index 4e04d51e8..cea3bcd3e 100644 --- a/modules/documents/karrio/server/documents/generator.py +++ b/modules/documents/karrio/server/documents/generator.py @@ -116,7 +116,7 @@ def generate( optimize_size=("fonts", "images"), ) finally: - html.close() + lib.failsafe(lambda: html.close()) return buffer diff --git a/modules/documents/setup.py b/modules/documents/setup.py index ed1799a70..40ce0e9bb 100644 --- a/modules/documents/setup.py +++ b/modules/documents/setup.py @@ -5,7 +5,7 @@ setup( name="karrio.server.documents", - version="2024.12rc3", + version="2024.12rc5", description="Multi-carrier shipping API apps module", long_description=long_description, long_description_content_type="text/markdown",