mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-05 10:13:09 +00: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:
committed by
Toshio Kuratomi
parent
7db4ed02ee
commit
56dcf2cc04
@@ -187,6 +187,8 @@ class LookupModule(LookupBase):
|
||||
try:
|
||||
if not self.parse_simple_args(term):
|
||||
self.parse_kv_args(parse_kv(term))
|
||||
except AnsibleError:
|
||||
raise
|
||||
except Exception as e:
|
||||
raise AnsibleError("unknown error parsing with_sequence arguments: %r. Error was: %s" % (term, e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user