Avoid crash when imageinfo is missing.
This commit is contained in:
parent
6f66e85b1e
commit
c8d6e0e9d6
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue