1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 02:44:44 +00:00
This commit is contained in:
deadc0de6
2021-11-18 15:20:31 +01:00
parent eb3cdbca60
commit 24b43522a4

View File

@@ -1444,17 +1444,17 @@ class CfgYaml:
return {**low, **high}
final = high.copy()
for k, v in low.items():
if isinstance(v, dict):
for k, val in low.items():
if isinstance(val, dict):
# content is dict, recurse
if k not in final:
final[k] = {}
final[k] = cls._merge_dict(v, final[k], deep=True)
elif isinstance(v, list):
final[k] = cls._merge_dict(val, final[k], deep=True)
elif isinstance(val, list):
# content is list, merge
if k not in final:
final[k] = []
final[k] += v
final[k] += val
else:
# don't know how to handle
err = 'unable to merge'