From 1bbfc6081493402bdc328ef5c96f3865e918abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 28 Oct 2018 13:08:29 +0100 Subject: [PATCH] [preview] Fix displaying GIFs without duration --- url_image_preview/resize_gif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url_image_preview/resize_gif.py b/url_image_preview/resize_gif.py index 1147269..6170f6e 100644 --- a/url_image_preview/resize_gif.py +++ b/url_image_preview/resize_gif.py @@ -26,7 +26,7 @@ def analyse_image(mem): results = { 'size': image.size, 'mode': 'full', - 'duration': image.info["duration"] + 'duration': image.info.get('duration', 0) } try: