Improve Compatibility with Python3

replace .iteritems() with .items | list in jinja2 Templates
This commit is contained in:
Alexander Grothe
2019-02-24 17:50:32 +01:00
parent b816a03d69
commit 76ace23b5e
4 changed files with 5 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
{% for name, path in media_dirs.iteritems() %}
{% for name, path in media_dirs.items() | list %}
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
{% endfor %}

View File

@@ -78,7 +78,7 @@
follow symlinks= yes
wide links= yes
{% endif %}
{% for name, path in media_dirs.iteritems() %}
{% for name, path in media_dirs.items() | list %}
[{{ name }}]
path = {{ path }}
comment = {{ name }} on %h

View File

@@ -90,7 +90,7 @@ Section "Monitor"
EndSection
{% endif %}
{% for connector, data in xrandr["Screen 0:"].iteritems() %}
{% for connector, data in xrandr["Screen 0:"].items() | list %}
{% if not data.is_connected or connector != xorg.primary.connector or (xorg.secondary is defined and connector != xorg.secondary.connector) %}
Section "Monitor"
Identifier "{{ connector|replace("-","") }}"