From 05609bda61686d4e5881e524798fd103631aa1df Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 27 Nov 2008 06:40:21 +0000 Subject: [PATCH] Fix get_config --- deluge/plugins/label/label/core.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/label/label/core.py index f08ccb00f..279bbb8fa 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -293,13 +293,14 @@ class Core(CorePluginBase): def export_get_config(self): "see : label_set_config" - return dict ( (k,self.config[k] ) for k in CORE_OPTIONS) + return dict((key, self.config[key]) for key in CORE_OPTIONS if key in self.config.config) def export_set_config(self, options): """global_options:""" - for key in CORE_OPTIONS: - if options.has_key(key): - self.config[key] = options[key] + for key, value in options.items: + if key in CORE_OPTIONS: + self.config[key] = value + self.config.save() def _status_get_label(self, torrent_id):