src/cm/utils/misc.py
author raph
Wed, 24 Feb 2010 01:39:01 +0900
changeset 195 b58d55229bdf
parent 0 40c8f766c9b8
permissions -rw-r--r--
desactivate -> deactivate (fixes #55)


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)