From e8b2ea873c7b9fa9f09ea48abd396c77f99971f4 Mon Sep 17 00:00:00 2001 From: Jan Broer Date: Tue, 29 Mar 2016 01:25:25 +0200 Subject: [PATCH] Don't send AZW formats via mail --- cps/helper.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cps/helper.py b/cps/helper.py index b18bb778..704d0bb1 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -88,10 +88,6 @@ def send_mail(book_id, kindle_mail): for entry in data: if entry.format == "MOBI": formats["mobi"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".mobi") - if entry.format == "AZW": - formats["azw"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".azw") - if entry.format == "AZW3": - formats["azw3"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".azw3") if entry.format == "EPUB": formats["epub"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".epub") if entry.format == "PDF": @@ -100,11 +96,7 @@ def send_mail(book_id, kindle_mail): if len(formats) == 0: return "Could not find any formats suitable for sending by email" - if 'azw3' in formats: - msg.attach(get_attachment(formats['azw3'])) - elif 'azw' in formats: - msg.attach(get_attachment(formats['azw'])) - elif 'mobi' in formats: + if 'mobi' in formats: msg.attach(get_attachment(formats['mobi'])) elif 'epub' in formats: filepath = make_mobi(book.id)