mirror of
https://github.com/powerline/powerline.git
synced 2025-07-30 17:25:28 +02:00
parent
48e06cbf9e
commit
5bb993ca53
@ -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 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user