mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 21:14:55 +00:00
Fix #1984 : KeyError in preferences.py if key not in stored config
This commit is contained in:
parent
370035ffc5
commit
eb70a7a6dc
@ -727,7 +727,10 @@ class Preferences(component.Component):
|
|||||||
config_to_set = {}
|
config_to_set = {}
|
||||||
for key in new_core_config.keys():
|
for key in new_core_config.keys():
|
||||||
# The values do not match so this needs to be updated
|
# 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]
|
config_to_set[key] = new_core_config[key]
|
||||||
|
|
||||||
if config_to_set:
|
if config_to_set:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user