|
|
@ -168,8 +168,8 @@ def geoip(ip_addr):
|
|
|
|
location = response.city.name, response.subdivisions.name, response.country.name
|
|
|
|
location = response.city.name, response.subdivisions.name, response.country.name
|
|
|
|
except geoip2.errors.AddressNotFoundError:
|
|
|
|
except geoip2.errors.AddressNotFoundError:
|
|
|
|
location = None, None, None
|
|
|
|
location = None, None, None
|
|
|
|
region = None
|
|
|
|
if location:
|
|
|
|
city = None
|
|
|
|
ipcachewrite(ip_addr, location)
|
|
|
|
return location
|
|
|
|
return location
|
|
|
|
|
|
|
|
|
|
|
|
def workaround(city, region, country):
|
|
|
|
def workaround(city, region, country):
|
|
|
|