src/cm/utils/misc.py
author gibus
Mon, 06 Jun 2011 10:08:10 +0200
changeset 355 c926868cf7e6
parent 0 40c8f766c9b8
permissions -rw-r--r--
if DECORATED_CREATORS take into account the "fake" username if has_own_perm()


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)