better error on invalid task lists

pull/13400/head
Brian Coca 9 years ago
parent df16d26b33
commit 53cd802251

@ -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 # we import here to prevent a circular dependency with imports
from ansible.playbook.block import Block from ansible.playbook.block import Block
try:
assert isinstance(ds, (list, type(None))) assert isinstance(ds, (list, type(None)))
except AssertionError:
raise AnsibleParserError("Task list is not a list, invalid format provided: %s" % ds)
block_list = [] block_list = []
if ds: if ds:

Loading…
Cancel
Save