From 680bcc42809452b9ed41254b6a540fb73e40f8dc Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 6 Jan 2021 12:33:09 -0600 Subject: [PATCH] Add a fake get_image_size() method for when no image processing available. Closes #621 --- fanficfare/story.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fanficfare/story.py b/fanficfare/story.py index 23e1b064..bafa0200 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -156,6 +156,10 @@ except: return (data,imgtype,imagetypes[imgtype]) except: + # No calibre or PIL, give a random largish size. + def get_image_size(data): + return 1000,1000 + # No calibre or PIL, simple pass through with mimetype. def convert_image(url,data,sizes,grayscale, removetrans,imgtype="jpg",background='#ffffff'):