[modules/nic] Too many addresses per interface
Addresses were not cleared correctly, resulting in too many IPs being displayed for the second, third, etc. interface.
This commit is contained in:
parent
749a9761b2
commit
89f49856d9
1 changed files with 1 additions and 1 deletions
|
@ -17,9 +17,9 @@ class Module(bumblebee.module.Module):
|
||||||
def widgets(self):
|
def widgets(self):
|
||||||
result = []
|
result = []
|
||||||
interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ]
|
interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ]
|
||||||
addr = []
|
|
||||||
state = "down"
|
state = "down"
|
||||||
for intf in interfaces:
|
for intf in interfaces:
|
||||||
|
addr = []
|
||||||
try:
|
try:
|
||||||
if netifaces.AF_INET in netifaces.ifaddresses(intf):
|
if netifaces.AF_INET in netifaces.ifaddresses(intf):
|
||||||
for ip in netifaces.ifaddresses(intf)[netifaces.AF_INET]:
|
for ip in netifaces.ifaddresses(intf)[netifaces.AF_INET]:
|
||||||
|
|
Loading…
Reference in a new issue