Commit 959af67f by Michael DeHaan

Merge pull request #7608 from jjneely/lookup-function

template.py: Handle purposely raised exceptions in lookup()
parents b94bde97 2fda9bc7
...@@ -91,6 +91,9 @@ def lookup(name, *args, **kwargs): ...@@ -91,6 +91,9 @@ def lookup(name, *args, **kwargs):
# safely catch run failures per #5059 # safely catch run failures per #5059
try: try:
ran = instance.run(*args, inject=vars, **kwargs) ran = instance.run(*args, inject=vars, **kwargs)
except errors.AnsibleError:
# Plugin raised this on purpose
raise
except Exception, e: except Exception, e:
ran = None ran = None
if ran: if ran:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment