Skip to content

Commit

Permalink
feat: allow for integer list keys
Browse files Browse the repository at this point in the history
  • Loading branch information
stmosher committed Jul 24, 2023
1 parent 98ca0d0 commit 04e6866
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/mdd_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _merge(result_cfgs, v, path=None, filepath=None, hierarchy_level=None, playb
def list_to_dict(my_list, m_key):
my_dict = {}
for i in my_list:
key = i[m_key]
key = str(i[m_key])
my_dict[key] = i
return my_dict

Expand Down Expand Up @@ -211,9 +211,9 @@ def find_paths(d, path=[], list_key_map=None):
def _find_paths(d, path=[]):
if isinstance(d, dict):
for k, v in d.items():
merge_key = get_merge_key(":".join(str(path)), list_key_map)
merge_key = get_merge_key(":".join(path), list_key_map)
if merge_key:
special_paths.append(("/:/".join(str(path)), len(path)))
special_paths.append(("/:/".join(path), len(path)))
_find_paths(v, path + [str(k)])

_find_paths(d)
Expand Down

0 comments on commit 04e6866

Please sign in to comment.