[modules/nic] Interfaces were always up
Wrong initialization of the status variable led to interfaces that were always in up state.
This commit is contained in:
parent
b6c430a8da
commit
af6055bd83
1 changed files with 1 additions and 1 deletions
|
@ -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]:
|
||||
|
|
Loading…
Reference in a new issue