aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/__init__.py
blob: 206d0d1c66c2d6a7a7e82f85941d9dbbbf8b39ff (plain)
1
2
3
4
5
6
7
8
9
10
11
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)