From 624bc609a058145092e9eb912699e98fcaf35c70 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 13 Jul 2012 12:12:16 -0500 Subject: [PATCH] CLI: Use calibre.utils.magick image library when run with calibre-debug -e --- downloader.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/downloader.py b/downloader.py index 55d4843c..7377de01 100644 --- a/downloader.py +++ b/downloader.py @@ -148,11 +148,16 @@ def main(): ## Check for include_images and absence of PIL, give warning. if adapter.getConfig('include_images'): try: - import Image + from calibre.utils.magick import Image + logging.debug("Using calibre.utils.magick") except: - print "You have include_images enabled, but Python Image Library(PIL) isn't found.\nImages will be included full size in original format.\nContinue? (y/n)?" - if not sys.stdin.readline().strip().lower().startswith('y'): - return + try: + import Image + logging.debug("Using PIL") + except: + print "You have include_images enabled, but Python Image Library(PIL) isn't found.\nImages will be included full size in original format.\nContinue? (y/n)?" + if not sys.stdin.readline().strip().lower().startswith('y'): + return ## three tries, that's enough if both user/pass & is_adult needed,