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:
Peter Sprygada 2018-11-30 07:22:33 -05:00 committed by Ganesh Nalawade
parent c1a30c743e
commit 2a4be2748f

View file

@ -301,7 +301,10 @@ def dict_merge(base, other):
if key in other:
item = other.get(key)
if item is not None:
if isinstance(other[key], dict):
combined[key] = dict_merge(value, other[key])
else:
combined[key] = other[key]
else:
combined[key] = item
else: