Commit 27a7896b authored by Joanne Hugé's avatar Joanne Hugé

geoip2: handle IPs without country information

For instance has an entry in the geoip2 database without country
parent df8f8320
......@@ -236,7 +236,7 @@ class BaseTunnelManager(object):
def geoiplookup(ip):
return country(ip).country.iso_code.encode()
except errors.AddressNotFoundError:
except Exception:
self._geoiplookup = geoiplookup
if cache.same_country:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment