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

Fix except statement in template module.

Python 2.4 (RHEL 5) does not know 'as'.
This commit is contained in:
Jeroen Hoekx 2012-03-30 11:46:30 +02:00
parent 2372a3b734
commit 12d01a3444

View file

@ -97,7 +97,7 @@ try:
# call Jinja2 here and save the new template file # call Jinja2 here and save the new template file
template = environment.from_string(source) template = environment.from_string(source)
data_out = template.render(data) data_out = template.render(data)
except jinja2.TemplateError as e: except jinja2.TemplateError, e:
print json.dumps({ print json.dumps({
"failed": True, "failed": True,
"msg" : e.message "msg" : e.message