From ac3ba8db77addf8ab928e00b7bc9f04b11e58f2d Mon Sep 17 00:00:00 2001 From: David Lynch Date: Mon, 14 Oct 2019 00:29:40 -0500 Subject: [PATCH] Fix sparse object passed for cover options --- ebook/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebook/__init__.py b/ebook/__init__.py index 31d6f52..ea15ff5 100644 --- a/ebook/__init__.py +++ b/ebook/__init__.py @@ -109,7 +109,7 @@ def generate_epub(story, cover_options={}, output_filename=None): # The cover is static, and the only change comes from the image which we generate html = [('Cover', 'cover.html', cover_template)] - if cover_options and cover_options["cover_url"]: + if cover_options and "cover_url" in cover_options: image = make_cover_from_url(cover_options["cover_url"], story.title, story.author) elif story.cover_url: image = make_cover_from_url(story.cover_url, story.title, story.author)