From 8270f8e183da74162e90b9485e33796377384d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Tue, 3 Jul 2018 14:33:20 +0200 Subject: [PATCH] Fix Instagram exceptions --- commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.py b/commands.py index 05717d0..05ead63 100644 --- a/commands.py +++ b/commands.py @@ -126,7 +126,7 @@ class Commands(object): media = instagram.get_media() media = [m for m in media if [k for k in keywords \ if m['type'] == 'Image' and k.lower() in m['title'].lower()]] - except (InstagramError, IndexError): + except (InstagramError, TypeError, KeyError): return None else: return media