Add some debugging when DB libraries are not found
This commit is contained in:
		
							
								
								
									
										4
									
								
								bms.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								bms.py
									
									
									
									
									
								
							| @@ -568,7 +568,7 @@ def main(): | |||||||
| def prometheus_export(daemonize=True, filename=None): | def prometheus_export(daemonize=True, filename=None): | ||||||
|     global debug |     global debug | ||||||
|     if not can_export_prometheus: |     if not can_export_prometheus: | ||||||
|         return |         raise ModuleNotFoundError("Unable to export to Prometheus. Is prometheus-client installed?") | ||||||
|  |  | ||||||
|     data = dict() |     data = dict() | ||||||
|     # Initialize data structure, to fill in help values |     # 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 |     global influxclient | ||||||
|  |  | ||||||
|     if not can_export_influxdb: |     if not can_export_influxdb: | ||||||
|         return |         raise ModuleNotFoundError("Unable to export to InfluxDB. Is influxdb-client installed?") | ||||||
|  |  | ||||||
|     data = dict() |     data = dict() | ||||||
|     # Initialize data structure, to fill in help values |     # Initialize data structure, to fill in help values | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user