aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2010-07-10 21:22:40 -0700
committerBrian Dolbec <brian.dolbec@gmail.com>2010-07-10 21:22:40 -0700
commit2af5001968434fece890d5042f351234bba973c1 (patch)
tree41b2577eb245eec960540b0826dc1fac46790027
parentModify the API to be more compatible with a c interface. (diff)
downloadoverlord-2af5001968434fece890d5042f351234bba973c1.tar.gz
overlord-2af5001968434fece890d5042f351234bba973c1.tar.bz2
overlord-2af5001968434fece890d5042f351234bba973c1.zip
Add a get_option function as a convenience function for option retrieval instead of using the class instance as a dictionary.
-rw-r--r--layman/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/layman/config.py b/layman/config.py
index f3ea492..71cf97b 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -109,6 +109,11 @@ class BareConfig(object):
return self._defaults
+ def get_option(self, key):
+ """returns the current option's value"""
+ return self.__getitem__(key)
+
+
def set_option(self, option, value):
"""Sets an option to the value """
self._options[option] = value