mirror of
https://github.com/alerta/alerta.git
synced 2025-01-24 17:29:39 +00:00
49ec257e76
* Add attributes field to heartbeat for use in hb alerts * Whitespace fix for pre-commit hook to pass
12 lines
307 B
Python
12 lines
307 B
Python
def merge(dict1, dict2):
|
|
"""
|
|
Merge two dictionaries.
|
|
:param dict1:
|
|
:param dict2:
|
|
:return:
|
|
"""
|
|
for k in dict2:
|
|
if k in dict1 and isinstance(dict1[k], dict) and isinstance(dict2[k], dict):
|
|
merge(dict1[k], dict2[k])
|
|
else:
|
|
dict1[k] = dict2[k]
|