[modules] Allow modules to provide default click actions
Pass the "output" object to the modules' constructor to allow them to define their own callbacks. Any user-provided callbacks take precedence and override those of the module.
This commit is contained in:
parent
63e041259f
commit
fca3171556
11 changed files with 20 additions and 15 deletions
|
@ -12,7 +12,7 @@ def description():
|
|||
return "Displays the names, IP addresses and status of each available interface."
|
||||
|
||||
class Module(bumblebee.module.Module):
|
||||
def __init__(self, args):
|
||||
def __init__(self, output, args):
|
||||
super(Module, self).__init__(args)
|
||||
self._exclude = ( "lo", "virbr" )
|
||||
self._interfaces = [ i for i in netifaces.interfaces() if not i.startswith(self._exclude) ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue