configfile: add get_prefix_options method

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt authored and Kevin O'Connor committed 2018-09-30 11:51:26 -04:00
1 parent 8c2991ceac
commit d9e35481be
1 file changed
+3
+3
View File
@@ -74,6 +74,9 @@ class ConfigWrapper:
def get_prefix_sections(self, prefix):
return [self.getsection(s) for s in self.fileconfig.sections()
if s.startswith(prefix)]
def get_prefix_options(self, prefix):
return [o for o in self.fileconfig.options(self.section)
if o.startswith(prefix)]
AUTOSAVE_HEADER = """
#*# <---------------------- SAVE_CONFIG ---------------------->