mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51: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:
parent
d2e8da4181
commit
ea051b7f3c
1 changed files with 3 additions and 1 deletions
|
@ -174,6 +174,8 @@ def parse_conf(filename):
|
|||
def get_env_options(*vars):
|
||||
options = Options()
|
||||
for var in vars:
|
||||
value = os.getenv(var)
|
||||
if value is not None:
|
||||
options[var] = os.getenv(var)
|
||||
return options
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue