summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Churchill <damien.churchill@ukplc.net>2010-06-04 16:30:51 +0100
committerDamien Churchill <damien.churchill@ukplc.net>2010-06-04 16:30:51 +0100
commit99c1a61383512be361ab0284c7d0dad5469ee463 (patch)
tree02f562b46aca12fba1e7fa2cbcb29cc744278bc0
parent2e55769c188a3850388331c825dcdcd80f36b19a (diff)
downloaddeluge-99c1a61383512be361ab0284c7d0dad5469ee463.tar.gz
deluge-99c1a61383512be361ab0284c7d0dad5469ee463.tar.bz2
deluge-99c1a61383512be361ab0284c7d0dad5469ee463.zip
Save the execute config after adding/removing/saving commands
-rw-r--r--deluge/plugins/execute/execute/core.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py
index dec95d64d..3f1398278 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()