From 89f49856d928dfef5ae383cf3308521b0a2f9ee6 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 6 Nov 2016 08:21:33 +0100 Subject: [PATCH] [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. --- 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 cfb7fa4..3bdb50d 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) ] - addr = [] state = "down" for intf in interfaces: + addr = [] try: if netifaces.AF_INET in netifaces.ifaddresses(intf): for ip in netifaces.ifaddresses(intf)[netifaces.AF_INET]: