mirror of
https://github.com/chubin/wttr.in.git
synced 2025-08-14 07:48:24 +02:00
Enable ipcache writes from geoip lookup
This commit is contained in:
@ -168,8 +168,8 @@ def geoip(ip_addr):
|
||||
location = response.city.name, response.subdivisions.name, response.country.name
|
||||
except geoip2.errors.AddressNotFoundError:
|
||||
location = None, None, None
|
||||
region = None
|
||||
city = None
|
||||
if location:
|
||||
ipcachewrite(ip_addr, location)
|
||||
return location
|
||||
|
||||
def workaround(city, region, country):
|
||||
|
Reference in New Issue
Block a user