From b5f66789e70bd105e162470927942c40496cdc92 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 25 Mar 2013 19:12:39 +0100 Subject: simple rendering for settings page --- module/config/ConfigParser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/config/ConfigParser.py') diff --git a/module/config/ConfigParser.py b/module/config/ConfigParser.py index 2f974b75e..bf9192270 100644 --- a/module/config/ConfigParser.py +++ b/module/config/ConfigParser.py @@ -168,6 +168,10 @@ class ConfigParser: for name, config in self.config.iteritems(): yield name, config, self.values[name] if name in self.values else {} + def getSection(self, section): + """ Retrieves single config as tuple (section, values) """ + return self.config[section], self.values[section] if section in self.values else {} + def addConfigSection(self, section, name, desc, long_desc, config): """Adds a section to the config. `config` is a list of config tuples as used in plugin api defined as: The order of the config elements is preserved with OrderedDict -- cgit v1.2.3