Skip to content

Update Jinja2 to fix wrong error reporting in templates

Jérome Perrin requested to merge fix/jinja2_version_up into master

Error reporting is sometimes wrong, for example we have:

  File "parts/instance-apache-php/instance-apache-php.cfg.in", line 190, in top-level template code
    php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php
UndefinedError: unicode object has no element 0

which should be:

  File "parts/instance-apache-php/instance-apache-php.cfg.in", line 105, in top-level template code
    url = {{ slapparameter_dict['database-list'][0] }}
UndefinedError: unicode object has no element 0

updating jinja like this displays the actual error.

This was a jinja issue https://github.com/pallets/jinja/issues/276 that was fixed since jinja 2.10.0

Merge request reports