mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes an issue with dict_merge in network utils (#41107)
This change address a problem where the dict_merge function would fail due to the value being a nested dict. This will now recursively pass the value back through the dict_merge function.
This commit is contained in:
parent
c1a30c743e
commit
2a4be2748f
1 changed files with 4 additions and 1 deletions
|
@ -301,7 +301,10 @@ def dict_merge(base, other):
|
|||
if key in other:
|
||||
item = other.get(key)
|
||||
if item is not None:
|
||||
combined[key] = dict_merge(value, other[key])
|
||||
if isinstance(other[key], dict):
|
||||
combined[key] = dict_merge(value, other[key])
|
||||
else:
|
||||
combined[key] = other[key]
|
||||
else:
|
||||
combined[key] = item
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue