From e87b3fd5689aa20567167fafb19e9da195898349 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 14 Dec 2014 20:46:22 +0100 Subject: [PATCH] Fix loading of renamed config sections. --- qutebrowser/config/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index b7866d22a..a591262cd 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -360,9 +360,13 @@ class ConfigManager(QObject): old_sectname = reverse_renamed_sections[sectname] else: old_sectname = sectname - if old_sectname not in cp: + if old_sectname in cp: + real_sectname = old_sectname + elif sectname in cp: + real_sectname = sectname + else: continue - for k, v in cp[old_sectname].items(): + for k, v in cp[real_sectname].items(): if k.startswith(self.ESCAPE_CHAR): k = k[1:] # configparser can't handle = in keys :(