Update huwawei_lte_exporter
This commit is contained in:
parent
12ed365dff
commit
16d7f4b52f
@ -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]
|
||||
|
||||
|
Reference in New Issue
Block a user