src/cm/utils/misc.py
author gibus
Thu, 08 Sep 2011 15:24:06 +0200
changeset 377 5e4c48c6f942
parent 0 40c8f766c9b8
permissions -rw-r--r--
restore image for old 'add comment button' even if unused


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)