Fix a bug when importing settings

This commit is contained in:
Raoul Snyman 2017-10-09 18:09:45 -07:00
parent 7086c88c7c
commit fad0298490

View File

@ -899,6 +899,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties):
try:
value = import_settings.value(section_key)
except KeyError:
value = None
log.warning('The key "{key}" does not exist (anymore), so it will be skipped.'.format(key=section_key))
if value is not None:
settings.setValue('{key}'.format(key=section_key), value)