wp-cal-integration/adapters/utils.py

10 lines
275 B
Python
Raw Normal View History

2022-09-28 15:52:52 +02:00
import collections
def dict_merge(dct, merge_dct):
for k, v in merge_dct.items():
if (k in dct and isinstance(dct[k], dict) and isinstance(merge_dct[k], dict)): #noqa
dict_merge(dct[k], merge_dct[k])
else:
dct[k] = merge_dct[k]