Module: check_mk
Branch: master
Commit: a24c9cb3e00443253abf75d08039d839a6f2197b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a24c9cb3e00443…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 22 16:28:20 2014 +0200
Small code cleanup
---
modules/check_mk_base.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 679a20c..2494e02 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1595,15 +1595,15 @@ def pnp_cleanup(s):
# case the factor is 1.0 / 1048576.
def check_levels(value, dsname, params, unit = "", factor = 1.0,
statemarkers=False):
+ perfdata = []
+ infotext = ""
+
# None or (None, None) -> do not check any levels
if params == None or params == (None, None):
return 0, "", []
- perfdata = []
- infotext = ""
-
# Pair of numbers -> static levels
- if type(params) == tuple:
+ elif type(params) == tuple:
warn_upper, crit_upper = params[0] * factor, params[1] * factor,
warn_lower, crit_lower = None, None
ref_value = None