From 5bb993ca53078730b7e84653788dc9c4ea13e6f5 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 20 Sep 2014 14:01:42 +0400 Subject: [PATCH] Use region_name in place of region_code Closes #1081 --- powerline/segments/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerline/segments/common.py b/powerline/segments/common.py index d20a74c3..6ab82944 100644 --- a/powerline/segments/common.py +++ b/powerline/segments/common.py @@ -468,9 +468,10 @@ class WeatherSegment(KwThreadedSegment): location_data = json.loads(urllib_read('http://freegeoip.net/json/')) location = ','.join(( location_data['city'], - location_data['region_code'], + location_data['region_name'], location_data['country_code'] )) + self.info('Location returned by freegeoip is {0}', location) else: location = location_query query_data = {