From bb446c2f548b08ad745ff8b608383314e76a9224 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sat, 10 Jul 2010 21:22:40 -0700 Subject: Add a get_option function as a convenience function for option retrieval instead of using the class instance as a dictionary. --- layman/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layman/config.py b/layman/config.py index 5ad67f2..e62f535 100644 --- a/layman/config.py +++ b/layman/config.py @@ -108,6 +108,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 -- cgit v1.2.3-1-g7c22