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