Merge pull request #14679 from dagwieers/merge_hash_v2
Avoid merging a dict and a AnsibleUnicode
This commit is contained in:
commit
e4a5bcae3c
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ def merge_hash(a, b):
|
||||||
for k, v in iteritems(b):
|
for k, v in iteritems(b):
|
||||||
# if there's already such key in a
|
# if there's already such key in a
|
||||||
# and that key contains a MutableMapping
|
# and that key contains a MutableMapping
|
||||||
if k in result and isinstance(result[k], MutableMapping):
|
if k in result and isinstance(result[k], MutableMapping) and isinstance(v, MutableMapping):
|
||||||
# merge those dicts recursively
|
# merge those dicts recursively
|
||||||
result[k] = merge_hash(result[k], v)
|
result[k] = merge_hash(result[k], v)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue