From e10ad0e7456edaa76509508de9c23103603607f7 Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Mon, 20 Jun 2016 19:02:41 +0200 Subject: [PATCH] Make prope use of jinja templating features join is available in jinja-2.6, released in 2011. --- postfix/files/mapping.j2 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/postfix/files/mapping.j2 b/postfix/files/mapping.j2 index fac8e7f..976a205 100644 --- a/postfix/files/mapping.j2 +++ b/postfix/files/mapping.j2 @@ -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 -%}