Skip to content

Commit

Permalink
Use items() instead of iteritems()
Browse files Browse the repository at this point in the history
Iteritems was droppped in Python 3 so making sure the code still works.
  • Loading branch information
miska committed Apr 9, 2019
1 parent 04f8a67 commit 88dac9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions knot/files/knot.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ log:

{%- if server.key is defined %}
key:
{%- for key_name, key in server.key.iteritems() %}
{%- for key_name, key in server.key.items() %}
- id: {{ key_name }}
{%- for param_name, param_value in key.iteritems() %}
{%- for param_name, param_value in key.items() %}
{{ param_name }}: {% if param_value is string %}"{{ param_value }}"{% else %}{{ param_value }}{% endif %}
{%- endfor %}
{%- endfor %}
Expand Down Expand Up @@ -55,9 +55,9 @@ template:

{%- if server.zone is defined %}
zone:
{%- for zone_name, zone in server.zone.iteritems() %}
{%- for zone_name, zone in server.zone.items() %}
- domain: {{ zone_name }}
{%- for param_name, param_value in zone.iteritems() %}
{%- for param_name, param_value in zone.items() %}
{%- if param_name != "records" %}
{{ param_name }}: {% if param_value is string %}"{{ param_value }}"{% else %}{{ param_value }}{% endif %}
{%- endif %}
Expand Down

0 comments on commit 88dac9c

Please sign in to comment.