From c3e567969b6b74fb40a6276980aeab6386e4d61f Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Mon, 25 May 2015 21:43:37 +0100 Subject: [PATCH] Don't import setting keys that does not exists. Fixes bug 1458672. Fixes: https://launchpad.net/bugs/1458672 --- openlp/core/ui/mainwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 34cbad495..3b6a4b2c7 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -900,7 +900,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow, RegistryProperties): for section_key in import_keys: if 'eneral' in section_key: section_key = section_key.lower() - value = import_settings.value(section_key) + try: + value = import_settings.value(section_key) + except KeyError: + log.warning('The key "%s" does not exist (anymore), so it will be skipped.' % section_key) if value is not None: settings.setValue('%s' % (section_key), value) now = datetime.now()