diff options
Diffstat (limited to 'wqflask/utility')
-rwxr-xr-x | wqflask/utility/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/wqflask/utility/__init__.py b/wqflask/utility/__init__.py index e69de29b..206d0d1c 100755 --- a/wqflask/utility/__init__.py +++ b/wqflask/utility/__init__.py @@ -0,0 +1,12 @@ +class Bunch(object): + """Make the configuration a little cleaner""" + def __init__(self, config_string = "", **kw): + if config_string: + td = yaml.load(config_string) + self.__dict__.update(td) + else: + self.__dict__ = kw + + def __repr__(self): + return yaml.dump(self.__dict__, default_flow_style=False) + |