src/cm/utils/misc.py
author gibus
Thu, 10 May 2012 14:20:10 +0200
changeset 420 0c2f890486c0
parent 0 40c8f766c9b8
permissions -rw-r--r--
Prevents javascript error, when iframe is not ready and therefore iframe_onload function is not available.


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)