Révision c81c20ab
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)
| plugins/znc/znc_logs.py | ||
|---|---|---|
| 159 | 159 |
print('graph_period minute')
|
| 160 | 160 |
graph_order = [] |
| 161 | 161 |
|
| 162 |
if 'MUNIN_CAP_DIRTYCONFIG' in os.environ and os.environ['MUNIN_CAP_DIRTYCONFIG'] == 1:
|
|
| 162 |
if os.getenv('MUNIN_CAP_DIRTYCONFIG') == "1":
|
|
| 163 | 163 |
read_data(1) |
| 164 | 164 |
else: |
| 165 | 165 |
read_data(0) |
Formats disponibles : Unified diff