[modules/nic] Exclude docker and vbox interfaces

Until I have a clue on how to correctly handle them, exclude
docker and vbox network interfaces.
This commit is contained in:
Tobias Witek 2016-11-03 19:45:12 +01:00
parent 5532526595
commit 29131e2f65

View file

@ -14,7 +14,7 @@ def description():
class Module(bumblebee.module.Module): class Module(bumblebee.module.Module):
def __init__(self, output, args): def __init__(self, output, args):
super(Module, self).__init__(args) super(Module, self).__init__(args)
self._exclude = ( "lo", "virbr" ) self._exclude = ( "lo", "virbr", "docker", "vboxnet" )
self._interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ] self._interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ]
self._index = 0 self._index = 0
self._intf = self._interfaces[0] if len(self._interfaces) > 0 else None self._intf = self._interfaces[0] if len(self._interfaces) > 0 else None