Commit 1adefd5d authored by Julien Muchembled's avatar Julien Muchembled

same_country: fix UnicodeEncodeError in Peer.encode

parent ecda9f06
......@@ -230,7 +230,7 @@ class BaseTunnelManager(object):
country = database.Reader(db).country
def geoiplookup(ip):
try:
return country(ip).country.iso_code
return country(ip).country.iso_code.encode()
except errors.AddressNotFoundError:
return
self._geoiplookup = geoiplookup
......
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