diff --git a/powerline/segments/common.py b/powerline/segments/common.py index 3cf2efa2..f0265ffa 100644 --- a/powerline/segments/common.py +++ b/powerline/segments/common.py @@ -144,7 +144,7 @@ def weather(unit='c', location_query=None): response = json.loads(_urllib_read(url)) condition = response['query']['results']['weather']['rss']['channel']['item']['condition'] condition_code = int(condition['code']) - except (KeyError, ValueError): + except (KeyError, TypeError, ValueError): return None icon = u'〇' for icon, codes in weather_conditions_codes.items():