mirror of
https://github.com/chubin/wttr.in
synced 2024-11-15 00:27:09 +00:00
Add location[2] to ipcachewrite for new region part of cache
This commit is contained in:
parent
08be8787b1
commit
4fa1ebd995
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue