Add some debugging when DB libraries are not found

This commit is contained in:
Timothy Allen 2024-03-19 22:14:16 +02:00
parent 10bf0b4f1e
commit 2815665d2f

4
bms.py
View File

@ -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