summaryrefslogtreecommitdiff
path: root/python/skytools/config.py
diff options
context:
space:
mode:
authorMarko Kreen2010-06-15 12:25:02 +0000
committerMarko Kreen2010-06-23 13:36:41 +0000
commit8a6f18c3c7e1e7889901baec2bc1befd87f081f8 (patch)
tree618bcf2b0070672c79723f94df2a9ee6c599bc3b /python/skytools/config.py
parent72a0c448387e969966fa32d54c5cde7c35ff603b (diff)
skytools.Config: .options() and .has_options() methods.
Diffstat (limited to 'python/skytools/config.py')
-rw-r--r--python/skytools/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/skytools/config.py b/python/skytools/config.py
index 43d0a46b..047ae258 100644
--- a/python/skytools/config.py
+++ b/python/skytools/config.py
@@ -177,3 +177,12 @@ class Config(object):
"""Return new Config() instance with new main section on same config file."""
return Config(main_section, self.filename, self.sane_config)
+
+ def options(self):
+ """Return list of options in main section."""
+ return self.cf.options(self.main_section)
+
+ def has_option(self, opt):
+ """Checks if option exists in main section."""
+ return self.cf.has_option(self.main_section)
+