src/cm/utils/misc.py
author gibus
Tue, 15 May 2012 12:22:28 +0200
changeset 434 734c135fb553
parent 0 40c8f766c9b8
permissions -rw-r--r--
Fixed bad string for export to ms-word 2007.


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)