From c8d6e0e9d63e5e648e40edb8200c2213129a7455 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 18 Dec 2019 19:07:32 +0000 Subject: [PATCH] Avoid crash when imageinfo is missing. --- depicts/commons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depicts/commons.py b/depicts/commons.py index c19e4f5..ba73134 100644 --- a/depicts/commons.py +++ b/depicts/commons.py @@ -29,7 +29,7 @@ def image_detail(filenames, thumbheight=None, thumbwidth=None): for image in r.json()['query']['pages']: filename = utils.drop_start(image['title'], 'File:') - images[filename] = image['imageinfo'][0] + images[filename] = image['imageinfo'][0] if 'imageinfo' in image else None return images