[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:
parent
5532526595
commit
29131e2f65
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue