From 2be47a1e4fd80b5e891fae0deac4b78a9da5f580 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Oct 2016 04:40:50 -0500 Subject: [PATCH] Catch if missing country value Unusual, but apparently can happen --- resources/lib/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/api.py b/resources/lib/api.py index 03d43200..d0ad8594 100644 --- a/resources/lib/api.py +++ b/resources/lib/api.py @@ -358,7 +358,7 @@ class API(object): try: country = self.item['ProductionLocations'][0] - except IndexError: + except (IndexError, KeyError): country = None return country