1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

If failed lookups are fatal, re-raise the exception

Fixes #1938.
This commit is contained in:
Daniel Hokka Zakrisson 2013-01-29 10:31:33 +01:00
parent e166f71fcc
commit b79960e13b

View file

@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0):
except errors.AnsibleError:
if not lookup_fatal:
replacement = None
else:
raise
else:
replacement = None
return {'replacement': replacement, 'start': start, 'end': end}