mirror of
https://github.com/chubin/wttr.in.git
synced 2025-08-13 23:38:24 +02:00
Add location[2] to ipcachewrite for new region part of cache
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user