diff --git a/modules/weather.py b/modules/weather.py index 555b64e..61c083e 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -22,7 +22,7 @@ def location(q): results = web.get(uri) data = json.loads(results) - if not 'display_name' in data: + if len(data) < 1: return '?', None, None display_name = data[0]['display_name']