1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Plugin bitcoind_: use defaults for missing environment variables

Previously undefined environment variables were treated as "None"
instead of using the supplied defaults (e.g. for "rpchost" or
"rpcport").
This commit is contained in:
Lars Kruse 2019-07-23 21:07:05 +02:00
parent d2e8da4181
commit ea051b7f3c

View file

@ -174,7 +174,9 @@ def parse_conf(filename):
def get_env_options(*vars):
options = Options()
for var in vars:
options[var] = os.getenv(var)
value = os.getenv(var)
if value is not None:
options[var] = os.getenv(var)
return options