Skip to content

Commit

Permalink
Merge pull request #10 from f500/python3
Browse files Browse the repository at this point in the history
use items instead of iteritems to make the role compatible with python 3
  • Loading branch information
mjmeijerman authored Oct 29, 2018
2 parents b6f7c67 + ba1eeea commit 55840be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Again, no need to copy the entire dictionary.
Note that headers added to the `http` context will be ignored when you add headers in a `server` or `location` context.
So don't forget to combine all headers:

{% for key, value in (nginx_http_headers_default | combine(nginx_http_headers) | combine(specialized_headers)).iteritems() %}
{% for key, value in (nginx_http_headers_default | combine(nginx_http_headers) | combine(specialized_headers)).items() %}
add_header {{ key }} "{{ value }}" always;
{% endfor %}

Expand Down
4 changes: 2 additions & 2 deletions templates/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ http {
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;

{% for key, value in (nginx_http_params_default | combine(nginx_http_params)).iteritems() %}
{% for key, value in (nginx_http_params_default | combine(nginx_http_params)).items() %}
{% if value is sameas True %}
{{ key }} on;
{% elif value is sameas False %}
Expand All @@ -28,7 +28,7 @@ http {
{% endif %}
{% endfor %}

{% for key, value in (nginx_http_headers_default | combine(nginx_http_headers)).iteritems() %}
{% for key, value in (nginx_http_headers_default | combine(nginx_http_headers)).items() %}
add_header {{ key }} "{{ value }}" always;
{% endfor %}

Expand Down

0 comments on commit 55840be

Please sign in to comment.