Fix parsing of metric values
This commit is contained in:
@@ -42,7 +42,6 @@ def make_prometheus_exporter_request_handler(m):
|
|||||||
|
|
||||||
def export(self):
|
def export(self):
|
||||||
cmds_as_metric_value = [
|
cmds_as_metric_value = [
|
||||||
"adjfsdfj",
|
|
||||||
"battery_charging",
|
"battery_charging",
|
||||||
"battery_pers",
|
"battery_pers",
|
||||||
"battery_temp",
|
"battery_temp",
|
||||||
@@ -122,7 +121,7 @@ def make_prometheus_exporter_request_handler(m):
|
|||||||
for cmd in cmds_as_metric_value:
|
for cmd in cmds_as_metric_value:
|
||||||
d = data.get(cmd)
|
d = data.get(cmd)
|
||||||
|
|
||||||
if d is None:
|
if d is None or d == "":
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user