mirror of
https://github.com/chubin/wttr.in.git
synced 2025-08-13 15:37:03 +02:00
lib/location.py: location can be None (#296)
This commit is contained in:
@ -108,7 +108,7 @@ def ip2location(ip_addr):
|
||||
except requests.exceptions.ConnectionError:
|
||||
pass
|
||||
|
||||
if ';' in location:
|
||||
if location and ';' in location:
|
||||
location = location.split(';')[3], location.split(';')[1]
|
||||
else:
|
||||
location = location, None
|
||||
|
Reference in New Issue
Block a user