mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
with_sequence: pass AnsibleError through
The parsing methods try as hard as possible to generate meaningful error messages that are all ignored and immediately overwritten by a new AnsibleError instance. Better use the original one instead.
This commit is contained in:
parent
7db4ed02ee
commit
56dcf2cc04
1 changed files with 2 additions and 0 deletions
|
@ -187,6 +187,8 @@ class LookupModule(LookupBase):
|
||||||
try:
|
try:
|
||||||
if not self.parse_simple_args(term):
|
if not self.parse_simple_args(term):
|
||||||
self.parse_kv_args(parse_kv(term))
|
self.parse_kv_args(parse_kv(term))
|
||||||
|
except AnsibleError:
|
||||||
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise AnsibleError("unknown error parsing with_sequence arguments: %r. Error was: %s" % (term, e))
|
raise AnsibleError("unknown error parsing with_sequence arguments: %r. Error was: %s" % (term, e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue