Skip to content

Commit

Permalink
Merge pull request #2 from netmanagers/master
Browse files Browse the repository at this point in the history
s/iteritems/items/g
  • Loading branch information
aboe76 authored Apr 3, 2019
2 parents e4d60d0 + 827ae47 commit a68c972
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nut/templates/ups-conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@
maxretry = {{ ups.maxretry }}
retrydelay = {{ ups.retrydelay }}

{%- for name, params in ups.units.iteritems() %}
{%- for name, params in ups.units.items() %}

[{{ name }}]
{%- for k,v in params.iteritems() %}
{%- for k,v in params.items() %}
{{ k }} = {{ v }}
{%- endfor %}

Expand Down
4 changes: 2 additions & 2 deletions nut/templates/upsd-users.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
#
# MONITOR myups@localhost 1 upsmon pass master (or slave)

{%- for name, params in users.iteritems() %}
{%- for name, params in users.items() %}
[{{ name }}]
{%- for k,v in params.iteritems() %}
{%- for k,v in params.items() %}
{%- if k == 'upsmon' %}
{{ k }} {{ v }}
{%- else %}
Expand Down
2 changes: 1 addition & 1 deletion nut/templates/upsmon-conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ RUN_AS_USER {{ upsmon.run_as_user }}
{%- if upsmon.monitor is string %}
MONITOR {{ upsmon.monitor }}
{%- elif upsmon.monitor is mapping %}
{%- for u, p in upsmon.monitor.iteritems() %}
{%- for u, p in upsmon.monitor.items() %}
MONITOR {{ p['system'] }} {{ p['powervalue'] | default('1') }} {{ p['username'] }} {{ p['password'] }} {{ p['type'] |default('master') }}
{%- endfor %}
{%- else %}
Expand Down

0 comments on commit a68c972

Please sign in to comment.