From 2815665d2f12af00ddc2de2d200ddcc8c27fffb9 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 19 Mar 2024 22:14:16 +0200 Subject: [PATCH] Add some debugging when DB libraries are not found --- bms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bms.py b/bms.py index d43de6f..d65c12d 100755 --- a/bms.py +++ b/bms.py @@ -568,7 +568,7 @@ def main(): def prometheus_export(daemonize=True, filename=None): global debug if not can_export_prometheus: - return + raise ModuleNotFoundError("Unable to export to Prometheus. Is prometheus-client installed?") data = dict() # Initialize data structure, to fill in help values @@ -645,7 +645,7 @@ def influxdb_export(bucket, url=None, org=None, token=None, daemonize=True): global influxclient if not can_export_influxdb: - return + raise ModuleNotFoundError("Unable to export to InfluxDB. Is influxdb-client installed?") data = dict() # Initialize data structure, to fill in help values