From e1c5f69d54b98a22e4f5aa2ebd5c08498d10b19e Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 27 Dec 2008 21:06:53 +0000 Subject: [PATCH] Fix exception in label plugin when saving preferences --- 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 765bb9918..810fd6bd1 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -305,11 +305,12 @@ class Core(CorePluginBase): @export def set_config(self, options): """global_options:""" - for key, value in options.items: - if key in CORE_OPTIONS: - self.config[key] = value + if options: + for key, value in options.items: + if key in CORE_OPTIONS: + self.config[key] = value - self.config.save() + self.config.save() def _status_get_label(self, torrent_id): return self.torrent_labels.get(torrent_id) or ""