From d01c57a0fb117a1b29ee5d7dfda296026396fb82 Mon Sep 17 00:00:00 2001 From: Florian Rey Date: Mon, 15 Oct 2018 11:34:33 +0200 Subject: [PATCH] [All] Python 3 compatibility --- CHANGELOG.md | 2 ++ templates/config/_macros.j2 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ff808..499a216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- Python 3 compatibility ## [1.0.2] - 2018-06-05 ### Added diff --git a/templates/config/_macros.j2 b/templates/config/_macros.j2 index b8bb61d..d9af4ec 100644 --- a/templates/config/_macros.j2 +++ b/templates/config/_macros.j2 @@ -4,7 +4,7 @@ {%- if parameter is string or parameter is number -%} {{ parameter }}{{ '\n' }} {%- elif parameter is mapping -%} - {%- for parameter_key, parameter_value in parameter.iteritems() -%} + {%- for parameter_key, parameter_value in parameter.items() -%} {%- if parameter_key not in exclusions -%} {{ _config_parameter(parameter_key, parameter_value, indent) }}{% if not outer_loop.last %} {% endif %} {%- endif -%} @@ -17,7 +17,7 @@ {%- set vars = {'values': []} -%} {%- for parameter in parameters -%} {%- if parameter is mapping -%} - {%- for parameter_key, parameter_value in parameter.iteritems() -%} + {%- for parameter_key, parameter_value in parameter.items() -%} {%- if parameter_key == key -%} {%- if vars.update({'values': vars['values'] + [parameter_value]}) -%}{%- endif -%} {%- endif -%}