Fix loading of renamed config sections.

This commit is contained in:
Florian Bruhin 2014-12-14 20:46:22 +01:00
parent a96120b65a
commit e87b3fd568

View File

@ -360,9 +360,13 @@ class ConfigManager(QObject):
old_sectname = reverse_renamed_sections[sectname] old_sectname = reverse_renamed_sections[sectname]
else: else:
old_sectname = sectname 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 continue
for k, v in cp[old_sectname].items(): for k, v in cp[real_sectname].items():
if k.startswith(self.ESCAPE_CHAR): if k.startswith(self.ESCAPE_CHAR):
k = k[1:] k = k[1:]
# configparser can't handle = in keys :( # configparser can't handle = in keys :(