diff --git a/geoip-lookup.py b/geoip-lookup.py index aabc3ad..ea7a270 100755 --- a/geoip-lookup.py +++ b/geoip-lookup.py @@ -45,7 +45,7 @@ def get_county_code(ipaddress, dbfile): country = None if dbtype == 'GeoLite2-City' or dbtype == 'GeoIP2-City': country = reader.city(ipaddress).country - elif dbfile == 'GeoLite2-Country' or dbtype == 'GeoIP2-Country': + elif dbtype == 'GeoLite2-Country' or dbtype == 'GeoIP2-Country': country = reader.country(ipaddress).country # ASN is not supported # elif dbfile == 'GeoLite2-ASN' or dbtype == 'GeoIP2-ASN': @@ -87,7 +87,7 @@ def get_details(ipaddress, dbfile): network = None if dbtype == 'GeoLite2-City' or dbtype == 'GeoIP2-City': result = reader.city(ipaddress) - elif dbfile == 'GeoLite2-Country' or dbtype == 'GeoIP2-Country': + elif dbtype == 'GeoLite2-Country' or dbtype == 'GeoIP2-Country': result = reader.country(ipaddress) # ASN is not supported # elif dbfile == 'GeoLite2-ASN' or dbtype == 'GeoIP2-ASN':