From af6055bd83b470b34d26ed7bad3b59531f6e0c5c Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 6 Nov 2016 10:59:25 +0100 Subject: [PATCH] [modules/nic] Interfaces were always up Wrong initialization of the status variable led to interfaces that were always in up state. --- bumblebee/modules/nic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/nic.py b/bumblebee/modules/nic.py index 3bdb50d..af82b08 100644 --- a/bumblebee/modules/nic.py +++ b/bumblebee/modules/nic.py @@ -17,9 +17,9 @@ class Module(bumblebee.module.Module): def widgets(self): result = [] interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ] - state = "down" for intf in interfaces: addr = [] + state = "down" try: if netifaces.AF_INET in netifaces.ifaddresses(intf): for ip in netifaces.ifaddresses(intf)[netifaces.AF_INET]: