Improve Compatibility with Python3
replace .iteritems() with .items | list in jinja2 Templates
This commit is contained in:
@@ -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 %}
|
||||
|
@@ -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
|
||||
|
@@ -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("-","") }}"
|
||||
|
Reference in New Issue
Block a user