fixed usage of incorrect exception class

fixes #17895
pull/17923/head
Brian Coca 8 years ago
parent 2a234c1ff9
commit e72d1e995f

@ -178,7 +178,7 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
if data is None:
return []
elif not isinstance(data, list):
raise AnsibleError("included task files must contain a list of tasks", obj=data)
raise AnsibleParserError("included task files must contain a list of tasks", obj=data)
# since we can't send callbacks here, we display a message directly in
# the same fashion used by the on_include callback. We also do it here,

Loading…
Cancel
Save