Include error exception in AnsibleError

- Use to_native instead of str

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-05-19 22:26:55 +05:30 committed by Brian Coca
parent cce133b14f
commit f9b836a901
5 changed files with 11 additions and 9 deletions

View file

@ -178,7 +178,7 @@ class LookupModule(LookupBase):
yield formatted
except (ValueError, TypeError):
raise AnsibleError(
"problem formatting %r with %r" % self.format
"problem formatting %r with %r" % (i, self.format)
)
def run(self, terms, variables, **kwargs):