diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-25 19:12:39 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-25 19:12:39 +0100 |
commit | b5f66789e70bd105e162470927942c40496cdc92 (patch) | |
tree | 3a762f29008dd7d7c92221eb363f90580f8acb6f /module/config/ConfigParser.py | |
parent | added view type for input fields (diff) | |
download | pyload-b5f66789e70bd105e162470927942c40496cdc92.tar.xz |
simple rendering for settings page
Diffstat (limited to 'module/config/ConfigParser.py')
-rw-r--r-- | module/config/ConfigParser.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |