src/cm/utils/misc.py
author gibus
Thu, 08 Sep 2011 15:15:23 +0200
changeset 375 d6439b3eb2de
parent 0 40c8f766c9b8
permissions -rw-r--r--
replace 'add comment' button


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)