Add location[2] to ipcachewrite for new region part of cache

gregdan3/master
Gregory Danielson 4 years ago
parent 08be8787b1
commit 4fa1ebd995
No known key found for this signature in database
GPG Key ID: 88D4EF22F6C14CA7

@ -94,7 +94,8 @@ def ipcachewrite(ip_addr, location):
if not os.path.exists(IP2LCACHE):
os.makedirs(IP2LCACHE)
with open(cached, 'w') as file:
file.write(location[0] + ';' + location[1])
file.write(location[0] + ';' + location[1] + ';' + location[2])
# like ip2location format, but reversed
def ipcache(ip_addr):
cached = os.path.join(IP2LCACHE, ip_addr)

Loading…
Cancel
Save