Commit 14075edc by William Tisäter

Fix seek calculation for region (seek_region // 1000 -> seek_region - 1000)

parent b8bad4e0
...@@ -276,7 +276,7 @@ class GeoIP(GeoIPBase): ...@@ -276,7 +276,7 @@ class GeoIP(GeoIPBase):
seek_region = seek_country - const.STATE_BEGIN_REV0 seek_region = seek_country - const.STATE_BEGIN_REV0
if seek_region >= 1000: if seek_region >= 1000:
country_code = 'US' country_code = 'US'
region = ''.join([chr((seek_region // 1000) // 26 + 65), chr((seek_region // 1000) % 26 + 65)]) region = ''.join([chr((seek_region - 1000) // 26 + 65), chr((seek_region - 1000) % 26 + 65)])
else: else:
country_code = const.COUNTRY_CODES[seek_region] country_code = const.COUNTRY_CODES[seek_region]
region = '' region = ''
......
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