in connectors/config.py [0:0]
def _merge_dicts(hsh1, hsh2):
for k in set(hsh1.keys()).union(hsh2.keys()):
if k in hsh1 and k in hsh2:
if isinstance(hsh1[k], dict) and isinstance(
hsh2[k], dict
): # only merge objects
yield (k, dict(_merge_dicts(hsh1[k], hsh2[k])))
else:
yield (k, hsh2[k])
elif k in hsh1:
yield (k, hsh1[k])
else:
yield (k, hsh2[k])