From 76b7895e114801a5b252af5c7e5ea0a04872149d Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Mon, 5 Feb 2024 01:05:19 +0100 Subject: [PATCH] Fix bug. --- sensors-polling.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sensors-polling.py b/sensors-polling.py index da60be9..a7d5505 100755 --- a/sensors-polling.py +++ b/sensors-polling.py @@ -126,7 +126,11 @@ def sensors_polling(poller_conf): stop.wait(timeout=time_to_sleep) def metric_list(): - return([metric['name'] for metric in poller_conf['metrics']]) + metrics = [] + for poller_conf in polling_conf: + for metric in poller_conf['metrics']: + metrics.append(metric['name']) + return metrics class MyHandler(BaseHTTPRequestHandler): def do_GET(self):