mapping.j2: fixed handling of OrderedDict in Python 3

This commit is contained in:
Alexander Weidinger 2019-04-09 20:06:16 +02:00
parent 84c64267fa
commit c432ae23dc

View File

@ -21,6 +21,7 @@
{%- else %} {%- else %}
{#- Some settings need order, handle OrderedDict #} {#- Some settings need order, handle OrderedDict #}
{% for item in data %} {% for item in data %}
{{ format_value(item.keys()[0], item.values()[0]) }} {%- set key, value = item.popitem() %}
{{ format_value(key, value) }}
{%- endfor -%} {%- endfor -%}
{%- endif %} {%- endif %}