src/cm/utils/misc.py
author Simon Descarpentries <sid@sopinspace.com>
Tue, 18 Feb 2014 19:27:58 +0100
changeset 579 869f02c75687
parent 0 40c8f766c9b8
permissions -rw-r--r--
daily progress : suite/test style, config from single config file, attempt to test i18n in footer


def update(obj, kwargs):
    """
    Update obj attributes with values from kwargs
    """
    for k,v in kwargs.items():
        if hasattr(obj,k):
            setattr(obj,k,v)