diff --git a/offlineimap/CustomConfig.py b/offlineimap/CustomConfig.py index 47a5a41..f4af64a 100644 --- a/offlineimap/CustomConfig.py +++ b/offlineimap/CustomConfig.py @@ -117,7 +117,7 @@ class CustomConfigParser(SafeConfigParser): For instance, for "Account Test", returns "Test".""" key = key + ' ' - return [x[len(key):] for x in self.sections() \ + return [x[len(key):] for x in self.sections() if x.startswith(key)] def set_if_not_exists(self, section, option, value): @@ -157,7 +157,7 @@ def CustomConfigDefault(): pass -class ConfigHelperMixin(): +class ConfigHelperMixin: """Allow comfortable retrieving of config values pertaining to a section.