From 3ba202d467fd09f7bc1b44a027001a75aff9d5d7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 9 Jan 2015 14:38:20 +0100 Subject: [PATCH] Fix config breakage because of deleted option. --- qutebrowser/config/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index fb0e09906..03a7564ce 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -176,6 +176,7 @@ class ConfigManager(QObject): RENAMED_SECTIONS: A mapping of renamed sections, {'oldname': 'newname'} RENAMED_OPTIONS: A mapping of renamed options, {('section', 'oldname'): 'newname'} + DELETED_OPTIONS: A (section, option) list of deleted options. Attributes: sections: The configuration data as an OrderedDict. @@ -208,8 +209,11 @@ class ConfigManager(QObject): ('colors', 'tab.indicator.stop'): 'tabs.indicator.stop', ('colors', 'tab.indicator.error'): 'tabs.indicator.error', ('colors', 'tab.indicator.system'): 'tabs.indicator.system', - ('colors', 'tab.seperator'): 'tabs.seperator', } + DELETED_OPTIONS = [ + ('colors', 'tab.seperator'), + ('colors', 'tabs.seperator'), + ] changed = pyqtSignal(str, str) style_changed = pyqtSignal(str, str) @@ -356,7 +360,9 @@ class ConfigManager(QObject): for k, v in cp[real_sectname].items(): if k.startswith(self.ESCAPE_CHAR): k = k[1:] - if (sectname, k) in self.RENAMED_OPTIONS: + if (sectname, k) in self.DELETED_OPTIONS: + continue + elif (sectname, k) in self.RENAMED_OPTIONS: k = self.RENAMED_OPTIONS[sectname, k] self.set('conf', sectname, k, v, validate=False)