Commit f15ff911 by William Tisäter

Fix bug when looking up regions outside US and CA

parent 3a32e660
......@@ -299,7 +299,7 @@ class GeoIP(object):
region_code = get_region_code(seek_region - const.CANADA_OFFSET)
else:
index = (seek_region - const.WORLD_OFFSET) // const.FIPS_RANGE
if index in const.COUNTRY_CODES:
if index < len(const.COUNTRY_CODES):
country_code = const.COUNTRY_CODES[index]
elif self._databaseType in const.CITY_EDITIONS:
rec = self._get_record(ipnum)
......
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