wp-cal-integration/adapters/utils.py

14 lines
321 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-10-13 00:16:05 +02:00
import logging
logger = logging.getLogger(f"wp_cal.{__name__}")
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]