mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-30 13:02:28 +00:00
Merge branch 'bugfix_ip_lookup' into dev
This commit is contained in:
commit
b959f1f68b
@ -200,7 +200,7 @@ def get_ip_city(ip, timeout=10):
|
||||
url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=%s&format=json' % ip
|
||||
try:
|
||||
r = requests.get(url, timeout=timeout)
|
||||
except requests.Timeout:
|
||||
except:
|
||||
r = None
|
||||
city = 'Unknown'
|
||||
if r and r.status_code == 200:
|
||||
|
Loading…
Reference in New Issue
Block a user