This commit is contained in:
Kovid Goyal 2025-02-28 08:53:33 +05:30
parent 8af9c474d6
commit 882dc07eec
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -557,7 +557,7 @@ def check_if_css_needs_modification(extra_css: str) -> tuple[bool, bool]:
try: try:
sheet = css_parser().parseString(extra_css) sheet = css_parser().parseString(extra_css)
except Exception: except Exception:
pass sheet = None
else: else:
for rule in sheet.cssRules: for rule in sheet.cssRules:
if rule.type == CSSRule.PAGE_RULE: if rule.type == CSSRule.PAGE_RULE: