Module: deluge Branch: master Commit: b7e1fe1696a13fb5b0920fc710a774d279873f76
Author: Damien Churchill <[email protected]> Date: Fri Jun 4 16:30:51 2010 +0100 Save the execute config after adding/removing/saving commands --- deluge/plugins/execute/execute/core.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py index dec95d6..3f13982 100644 --- a/deluge/plugins/execute/execute/core.py +++ b/deluge/plugins/execute/execute/core.py @@ -123,6 +123,7 @@ class Core(CorePluginBase): def add_command(self, event, command): command_id = hashlib.sha1(str(time.time())).hexdigest() self.config["commands"].append((command_id, event, command)) + self.config.save() component.get("EventManager").emit(ExecuteCommandAddedEvent(command_id, event, command)) @export @@ -136,6 +137,7 @@ class Core(CorePluginBase): self.config["commands"].remove(command) component.get("EventManager").emit(ExecuteCommandRemovedEvent(command_id)) break + self.config.save() @export def save_command(self, command_id, event, cmd): @@ -143,3 +145,4 @@ class Core(CorePluginBase): if command[EXECUTE_ID] == command_id: self.config["commands"][i] = (command_id, event, cmd) break + self.config.save() -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
