src/cm/utils/misc.py
author gibus
Mon, 29 Nov 2010 14:12:38 +0100
changeset 339 0508284129cf
parent 0 40c8f766c9b8
permissions -rw-r--r--
Open automatically reply to comment form when comment_op url parameter is set to "reply", *even if there is no reply yet* (therefore no animation should have been triggered)


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)