wp-cal-integration/adapters/utils.py

10 lines
255 B
Python
Raw Permalink Normal View History

2022-09-28 15:59:12 +02:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
2022-09-28 15:52:52 +02:00
2022-09-28 15:59:12 +02:00
def dict_merge(d0, d1):
for k, v in d1.items():
if (k in d0 and isinstance(d0[k], dict) and isinstance(d1[k], dict)):
dict_merge(d0[k], d1[k])
2022-09-28 15:52:52 +02:00
else:
2022-09-28 15:59:12 +02:00
d0[k] = d1[k]