src/cm/utils/misc.py
author raph
Fri, 07 May 2010 10:06:10 +0200
changeset 271 542f1b389a29
parent 0 40c8f766c9b8
permissions -rw-r--r--
add test case for long lasting spannify


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)