Country code instead of name

This commit is contained in:
Anton Hvornum 2019-11-27 22:27:12 +00:00
parent 9d984957fe
commit bbcfd7a73d
1 changed files with 1 additions and 1 deletions

View File

@ -765,7 +765,7 @@ def guess_country(ip, *positionals, **kwargs):
return result
gi = pygeoip.GeoIP(GEOIP_DB)
result = gi.country_name_by_addr(ip)
result = gi.country_code_by_addr(ip)
else:
log(f'Missing GeoIP database: {GEOIP_DB}', origin='guess_country', level=LOG_LEVELS.ERROR)
return result