From d6e7521fc4d3d7fadd2a59d48bb1ae18e8aae82b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 19 Aug 2020 10:54:55 +0100 Subject: [PATCH] windows: Add missing return We were logging in a code path but not setting a return value. This was passing tests because it seems 'assertFalse' does a falsey check, not a true boolean False check. Change-Id: If0156cd4d4c1acbad683873d632ee5afb0b7b7ad Signed-off-by: Stephen Finucane --- os_vif/internal/ip/windows/impl_netifaces.py | 1 + 1 file changed, 1 insertion(+) diff --git a/os_vif/internal/ip/windows/impl_netifaces.py b/os_vif/internal/ip/windows/impl_netifaces.py index e0212603..69424adb 100644 --- a/os_vif/internal/ip/windows/impl_netifaces.py +++ b/os_vif/internal/ip/windows/impl_netifaces.py @@ -30,6 +30,7 @@ class Netifaces(ip_command.IpCommand): return bool(netifaces.ifaddresses(device)) except ValueError: LOG.warning("The device does not exist on the system: %s", device) + return False except OSError: LOG.error("Failed to get interface addresses: %s", device) return False