Skip to content

Commit

Permalink
Merge pull request #353 from lucagubler/bug/fix-index-out-of-range-352
Browse files Browse the repository at this point in the history
Check if list is truthy before using it (
  • Loading branch information
Donien authored Nov 22, 2024
2 parents 5958936 + b52444d commit 63139bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/module_utils/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def process_hash(attrs, level=3, indent=2, prefix=' '):
else:
result += "%s%s %s= {\n%s%s}\n" % (
prefix, attribute_types(attr), op, process_hash(attrs=value, indent=indent+2), ' '*indent)
elif type(value) is list:
elif type(value) is list and value:
if value[0] == "+":
op = "+"
value.pop(0)
Expand Down

0 comments on commit 63139bc

Please sign in to comment.