mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
unify DIRTYCONFIG handling in shell and python plugins
The following issues were fixed: * comparison too broad (e.g. "0" misinterpreted as "true") * python: comparing string with number (is never equal in python) * unwanted non-zero exitcode (compound command "&&" as last command in shell code block (e.g. "case" or "if" branch)) * access to unset variable (shell style issue)
This commit is contained in:
parent
270be2f59e
commit
c81c20ab3b
22 changed files with 32 additions and 48 deletions
|
@ -159,7 +159,7 @@ def emit_config():
|
|||
print('graph_period minute')
|
||||
graph_order = []
|
||||
|
||||
if 'MUNIN_CAP_DIRTYCONFIG' in os.environ and os.environ['MUNIN_CAP_DIRTYCONFIG'] == 1:
|
||||
if os.getenv('MUNIN_CAP_DIRTYCONFIG') == "1":
|
||||
read_data(1)
|
||||
else:
|
||||
read_data(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue