Only return valid ips from getInterfaceIps
This commit is contained in:
parent
dd46a64e79
commit
e18d3d0c93
1 changed files with 1 additions and 1 deletions
|
@ -291,5 +291,5 @@ def getInterfaceIps(ip_type="ipv4"):
|
||||||
except:
|
except:
|
||||||
pass
|
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))
|
return list(set(res))
|
||||||
|
|
Loading…
Reference in a new issue