From 97adb36f1b208f04cd0c9f9be41b3d0028951044 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sat, 31 Mar 2018 08:00:51 +0200 Subject: [PATCH] Bugfix Upload Message Improved errorhandling at import imagemagick --- cps/book_formats.py | 2 +- cps/templates/layout.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/book_formats.py b/cps/book_formats.py index bc9e889e..ea381b2b 100644 --- a/cps/book_formats.py +++ b/cps/book_formats.py @@ -15,7 +15,7 @@ try: from wand.image import Image from wand import version as ImageVersion use_generic_pdf_cover = False -except ImportError as e: +except (ImportError, RuntimeError) as e: logger.warning('cannot import Image, generating pdf covers for pdf uploads will not work: %s', e) use_generic_pdf_cover = True try: diff --git a/cps/templates/layout.html b/cps/templates/layout.html index 5e05db7d..d0260db6 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -100,8 +100,8 @@ {% endfor %}