src/cm/utils/misc.py
author gibus
Thu, 21 Jul 2011 15:03:38 +0200
changeset 366 98af3be91847
parent 0 40c8f766c9b8
permissions -rw-r--r--
For some reasons, abiwords can read background style attribute but not background-color


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)