diff --git a/lib/location.py b/lib/location.py index 6be90dd..8a19eaf 100644 --- a/lib/location.py +++ b/lib/location.py @@ -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)