parent
6c7cd5a367
commit
d0023d7940
1 changed files with 8 additions and 2 deletions
|
|
@ -31,12 +31,18 @@ def _render_current(data):
|
||||||
current_condition = data["current_condition"][0]
|
current_condition = data["current_condition"][0]
|
||||||
for field in EXPORTED_FIELDS:
|
for field in EXPORTED_FIELDS:
|
||||||
try:
|
try:
|
||||||
output.append("# %s\n%s{forecast=\"0h\"} %s" % (EXPORTED_FIELDS[field][0], EXPORTED_FIELDS[field][1], current_condition[field]))
|
output.append("# %s\n%s{forecast=\"0h\"} %s" %
|
||||||
|
(EXPORTED_FIELDS[field][0],
|
||||||
|
EXPORTED_FIELDS[field][1],
|
||||||
|
current_condition[field]))
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
for field in EXPORTED_FIELDS_DESC:
|
for field in EXPORTED_FIELDS_DESC:
|
||||||
try:
|
try:
|
||||||
output.append("# %s\n%s{forecast=\"0h\", description=\"%s\"} 1" % EXPORTED_FIELDS_DESC[field][0], EXPORTED_FIELDS_DESC[field][1], current_condition[field])
|
output.append("# %s\n%s{forecast=\"0h\", description=\"%s\"} 1" %
|
||||||
|
(EXPORTED_FIELDS_DESC[field][0],
|
||||||
|
EXPORTED_FIELDS_DESC[field][1],
|
||||||
|
current_condition[field]))
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue