From 882dc07eecc2a224ae64434897edccaf5e528fc6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 28 Feb 2025 08:53:33 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/polish/kepubify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/kepubify.py b/src/calibre/ebooks/oeb/polish/kepubify.py index 1aeb4c96b0..93e586893e 100644 --- a/src/calibre/ebooks/oeb/polish/kepubify.py +++ b/src/calibre/ebooks/oeb/polish/kepubify.py @@ -557,7 +557,7 @@ def check_if_css_needs_modification(extra_css: str) -> tuple[bool, bool]: try: sheet = css_parser().parseString(extra_css) except Exception: - pass + sheet = None else: for rule in sheet.cssRules: if rule.type == CSSRule.PAGE_RULE: