src/cm/utils/misc.py
author gibus
Mon, 07 May 2012 09:10:45 +0200
changeset 415 bacf162c7b58
parent 0 40c8f766c9b8
permissions -rw-r--r--
Adds api/convert to return HTML document from legacy format + Saves attached images when just converting to HTML, without creating a text + Returns nb of detached and removed commentswhen updating text.


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)