Update huwawei_lte_exporter

This commit is contained in:
sebclem 2024-03-26 15:10:03 +01:00
parent 12ed365dff
commit 16d7f4b52f

View File

@ -76,8 +76,6 @@ config = configparser.ConfigParser()
config.read('huwawei_lte_exporter.ini')
MANDATORY_ENV_VARS = ["ROUTER_ADDRESS", "ROUTER_USER", "ROUTER_PASS", "PROM_PORT"]
for var in MANDATORY_ENV_VARS:
if not config.has_option('DEFAULT', var):
raise EnvironmentError("Failed because {} is not set.".format(var))
if var in os.environ:
config['DEFAULT'][var] = os.environ[var]