changed plugin specification: use generic "handle_event" instead of "setup" and "cleanup"
fixed bug in reinitializing of plugins (Closes: #111) fixed glitch that delayed the results of the plugin_manager to go into effect by one request
This commit is contained in:
parent
0cf35e287c
commit
68e0cddc59
4 changed files with 76 additions and 54 deletions
|
@ -62,15 +62,16 @@ class volume_automount(cryptobox.plugins.base.CryptoBoxPlugin):
|
|||
return "volume_automount"
|
||||
|
||||
|
||||
def setup(self):
|
||||
def handle_event(self, event, event_info=None):
|
||||
"""Override bootup behaviour.
|
||||
|
||||
Mount all volumes marked as 'automount'.
|
||||
"""
|
||||
cryptobox.plugins.base.CryptoBoxPlugin.setup(self)
|
||||
for cont in self.cbox.get_container_list():
|
||||
if self.__is_auto_mount(cont) and not cont.is_mounted():
|
||||
cont.mount()
|
||||
cryptobox.plugins.base.CryptoBoxPlugin.handle_event(self, event, event_info)
|
||||
if event == "bootup":
|
||||
for cont in self.cbox.get_container_list():
|
||||
if self.__is_auto_mount(cont) and not cont.is_mounted():
|
||||
cont.mount()
|
||||
|
||||
|
||||
def is_useful(self, device):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue