From c1b205bad0166474e63dff54bda25ae2fde9b787 Mon Sep 17 00:00:00 2001 From: dbsqp <5895806+dbsqp@users.noreply.github.com> Date: Sun, 18 Apr 2021 21:41:38 +0200 Subject: [PATCH] error --- nut-influxdbv2-exporter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nut-influxdbv2-exporter.py b/nut-influxdbv2-exporter.py index 74c218b..0dd4a1c 100644 --- a/nut-influxdbv2-exporter.py +++ b/nut-influxdbv2-exporter.py @@ -93,8 +93,7 @@ def construct_object(data, remove_keys, host): for k, v in data.items(): if k == "ups.serial": - if v: - tags["hardware"]=':'.join(v[i:i+2] for i in range(0,12,2)) + tags["hardware"]=':'.join(v[i:i+2] for i in range(0,12,2)) elif k == "device.model": tags["model"]=v.strip() else: