diff options
author | Brian Dolbec <brian.dolbec@gmail.com> | 2010-07-10 21:22:40 -0700 |
---|---|---|
committer | Brian Dolbec <brian.dolbec@gmail.com> | 2011-02-11 02:49:14 -0800 |
commit | bb446c2f548b08ad745ff8b608383314e76a9224 (patch) | |
tree | 028e0558178f4de9ef9ace7bfb6a9607447311ba | |
parent | af8c821f1b6c1a48b5ce2f6ba328ba9ff8807a9d (diff) | |
download | layman-bb446c2f548b08ad745ff8b608383314e76a9224.tar.gz layman-bb446c2f548b08ad745ff8b608383314e76a9224.tar.bz2 layman-bb446c2f548b08ad745ff8b608383314e76a9224.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.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |