mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix wrong error class (#17259)
AnsibleError is not imported in that file, and since that's a parsing time issue, better raise AnsibleParserError like the rest of the file. Issue signaled on irc by gordon`
This commit is contained in:
parent
4a3a9c0f2d
commit
a942758a07
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,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…
Reference in a new issue