weather: fix error handling (caused breakage)

master
mutantmonkey 2013-08-24 19:12:15 -07:00
parent 6443442aff
commit f668589fcb
1 changed files with 1 additions and 1 deletions

View File

@ -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']