src/cm/utils/misc.py
author Production Moz <dev@sopinspace.com>
Tue, 25 Jun 2013 16:19:19 +0200
changeset 509 ff6921599cbc
parent 0 40c8f766c9b8
permissions -rw-r--r--
Fixes test for categories defined in workspace while None in textversion.


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)