mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Only return valid ips from getInterfaceIps
This commit is contained in:
parent
dd46a64e79
commit
e18d3d0c93
|
@ -291,5 +291,5 @@ def getInterfaceIps(ip_type="ipv4"):
|
|||
except:
|
||||
pass
|
||||
|
||||
res = [re.sub("%.*", "", ip) for ip in res if getIpType(ip) == ip_type]
|
||||
res = [re.sub("%.*", "", ip) for ip in res if getIpType(ip) == ip_type and isIp(ip)]
|
||||
return list(set(res))
|
||||
|
|
Loading…
Reference in a new issue