Fix #1984 : KeyError in preferences.py if key not in stored config
This commit is contained in:
parent
370035ffc5
commit
eb70a7a6dc
|
@ -727,8 +727,11 @@ 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
|
||||||
|
try:
|
||||||
if self.core_config[key] != new_core_config[key]:
|
if self.core_config[key] != new_core_config[key]:
|
||||||
config_to_set[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:
|
if config_to_set:
|
||||||
# Set each changed config value in the core
|
# Set each changed config value in the core
|
||||||
|
|
Loading…
Reference in New Issue