From eb70a7a6dc5111438ea210af4dc2322049c2d6c1 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 1 Dec 2011 19:30:57 +0000 Subject: [PATCH] Fix #1984 : KeyError in preferences.py if key not in stored config --- deluge/ui/gtkui/preferences.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 7a40fed2f..02ec7d922 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -727,7 +727,10 @@ class Preferences(component.Component): config_to_set = {} for key in new_core_config.keys(): # The values do not match so this needs to be updated - if self.core_config[key] != new_core_config[key]: + try: + if self.core_config[key] != new_core_config[key]: + config_to_set[key] = new_core_config[key] + except KeyError: config_to_set[key] = new_core_config[key] if config_to_set: