From a942758a0714c6176cc09a78562e9f3c62b2c8ff Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 26 Aug 2016 14:53:28 +0200 Subject: [PATCH] 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` --- lib/ansible/playbook/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/helpers.py b/lib/ansible/playbook/helpers.py index d1b2d0ed7ab..fc6837dfbc3 100644 --- a/lib/ansible/playbook/helpers.py +++ b/lib/ansible/playbook/helpers.py @@ -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,