From e18d3d0c93e541a8ea8dec31b186eb3a01365f75 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 30 Jan 2019 14:51:45 +0100 Subject: [PATCH] Only return valid ips from getInterfaceIps --- src/util/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/helper.py b/src/util/helper.py index d2d8cfde..9b8cb12a 100644 --- a/src/util/helper.py +++ b/src/util/helper.py @@ -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))