Use region_name in place of region_code

Closes #1081
This commit is contained in:
ZyX 2014-09-20 14:01:42 +04:00
parent 48e06cbf9e
commit 5bb993ca53
1 changed files with 2 additions and 1 deletions

View File

@ -468,9 +468,10 @@ class WeatherSegment(KwThreadedSegment):
location_data = json.loads(urllib_read('http://freegeoip.net/json/')) location_data = json.loads(urllib_read('http://freegeoip.net/json/'))
location = ','.join(( location = ','.join((
location_data['city'], location_data['city'],
location_data['region_code'], location_data['region_name'],
location_data['country_code'] location_data['country_code']
)) ))
self.info('Location returned by freegeoip is {0}', location)
else: else:
location = location_query location = location_query
query_data = { query_data = {