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.
pull/18771/head
Benoît Allard 8 years ago 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))

Loading…
Cancel
Save