From 45a4c8c86716fc70ed71dca1f2708f9695168790 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 24 Oct 2020 11:34:59 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/conversion/plugins/html_input.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/conversion/plugins/html_input.py b/src/calibre/ebooks/conversion/plugins/html_input.py index 3350ad43fa..b9e8abc511 100644 --- a/src/calibre/ebooks/conversion/plugins/html_input.py +++ b/src/calibre/ebooks/conversion/plugins/html_input.py @@ -305,12 +305,12 @@ class HTMLInput(InputFormatPlugin): def css_import_handler(self, base, href): link, frag = self.link_to_local_path(href, base=base) if link is None or not os.access(link, os.R_OK) or os.path.isdir(link): - return (None, None) + return None, None try: with open(link, 'rb') as f: raw = f.read().decode('utf-8', 'replace') raw = self.oeb.css_preprocessor(raw, add_namespace=False) except: self.log.exception('Failed to read CSS file: %r'%link) - return (None, None) - return (None, raw) + return None, None + return None, raw