mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
better error on invalid task lists
This commit is contained in:
@@ -34,7 +34,10 @@ def load_list_of_blocks(ds, play, parent_block=None, role=None, task_include=Non
|
||||
# we import here to prevent a circular dependency with imports
|
||||
from ansible.playbook.block import Block
|
||||
|
||||
assert isinstance(ds, (list, type(None)))
|
||||
try:
|
||||
assert isinstance(ds, (list, type(None)))
|
||||
except AssertionError:
|
||||
raise AnsibleParserError("Task list is not a list, invalid format provided: %s" % ds)
|
||||
|
||||
block_list = []
|
||||
if ds:
|
||||
|
||||
Reference in New Issue
Block a user