From cd88af32f2f1c79ae4974d8647556d055a7a0d3a Mon Sep 17 00:00:00 2001 From: ouzklcn Date: Wed, 21 Sep 2016 11:27:37 +0300 Subject: [PATCH] add fix for janeczku/calibre-web#64 kindlegen conversation error --- cps/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cps/helper.py b/cps/helper.py index 907cd136..3cbc4534 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -103,6 +103,8 @@ def send_mail(book_id, kindle_mail): filepath = make_mobi(book.id) if filepath is not None: msg.attach(get_attachment(filepath)) + elif filepath is None: + return "Could not convert epub to mobi" elif 'pdf' in formats: msg.attach(get_attachment(formats['pdf'])) elif 'pdf' in formats: