From e3b65de69745f003a4f8c068b90c71f27aa2fd32 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 Jan 2023 07:16:01 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/writer8/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/writer8/main.py b/src/calibre/ebooks/mobi/writer8/main.py index 29ac173c6e..fe056e129a 100644 --- a/src/calibre/ebooks/mobi/writer8/main.py +++ b/src/calibre/ebooks/mobi/writer8/main.py @@ -42,7 +42,10 @@ class KF8Writer: def __init__(self, oeb, opts, resources): self.oeb, self.opts, self.log = oeb, opts, oeb.log - self.compress = not self.opts.dont_compress + try: + self.compress = not self.opts.dont_compress + except Exception: + self.compress = True self.has_tbs = False self.log.info('Creating KF8 output')