

def _modified(time, prev, curr, collected):
    prev_dict = dict(((res['id'], res) for res in prev))
    curr_dict = dict(((res['id'], res) for res in curr))
    same = (set(prev_dict.keys()) & set(curr_dict.keys()))
    for id_val in same:
        if (curr_dict[id_val] != prev_dict[id_val]):
            m = dict(((k, v) for (k, v) in six.iteritems(prev_dict[id_val]) if (v != curr_dict[id_val].get(k))))
            m['time'] = time.isoformat()
            m['id'] = id_val
            collected.append(m)
    return collected

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/statistics/oswl/saver.py _modified/original