Make prope use of jinja templating features

join is available in jinja-2.6, released in 2011.
This commit is contained in:
Gilles Dartiguelongue 2016-06-20 19:02:41 +02:00
parent 573211150f
commit e10ad0e745
1 changed files with 1 additions and 4 deletions

View File

@ -3,10 +3,7 @@
{%- macro format_value(key, value) %}
{#- Some settings, like virtual_alias_maps can take multiple values. Handle this case. -#}
{%- if value is iterable and value is not string -%}
{{ key }} {% for item in value -%}
{{ item }}
{%- if not loop.last %}, {% endif %}
{%- endfor %}
{{ key }} {{ value|join(", ") }}
{%- else -%}
{{ key }} {{ value }}
{%- endif -%}