Module: check_mk
Branch: master
Commit: 6321f60c717bdfb13060d7fa0c359fe951e33e7e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6321f60c717bdf…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Oct 7 14:38:30 2016 +0200
fixed params
---
checks/humidity.include | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/checks/humidity.include b/checks/humidity.include
index b3e7834..2c38ebf 100644
--- a/checks/humidity.include
+++ b/checks/humidity.include
@@ -27,16 +27,16 @@
# old params = (crit_low , warn_low, warn, crit)
def check_humidity(humidity, params):
- if params and type(params) in [ list, tuple ]:
- params = {
- "levels_lower" : (params[0], params[1]),
- "levels" : (params[2], params[3]),
- }
- else:
+ if params is None:
params = {
"levels_lower" : (-1, -1),
"levels" : (101, 101),
}
+ elif type(params) in [ list, tuple ]:
+ params = {
+ "levels_lower" : (params[0], params[1]),
+ "levels" : (params[2], params[3]),
+ }
crit_lower, warn_lower = params["levels_lower"]
warn_upper, crit_upper = params["levels"]