src/cm/utils/misc.py
author gibus
Tue, 15 May 2012 11:16:46 +0200
changeset 432 aad07a378d44
parent 0 40c8f766c9b8
permissions -rw-r--r--
Respect order by scope in show all comments or show all detached comments.


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)