Module: check_mk
Branch: master
Commit: 5cee9c2549b8cd11207fa0371ff6be0d57471744
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5cee9c2549b8cd…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Jan 5 15:32:21 2018 +0100
FIX 5608 temperature.include: Fixed device levels handling
Change-Id: I2fa617ce7a02c1a352051e07f5a333cb8eccbe2b
---
.werks/5608 | 11 +++++++++++
checks/temperature.include | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/5608 b/.werks/5608
new file mode 100644
index 0000000..4f9127d
--- /dev/null
+++ b/.werks/5608
@@ -0,0 +1,11 @@
+Title: temperature.include: Fixed device levels handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i3
+Date: 1515162662
+
+
diff --git a/checks/temperature.include b/checks/temperature.include
index a38a8eb..73268d5 100644
--- a/checks/temperature.include
+++ b/checks/temperature.include
@@ -131,7 +131,7 @@ def check_temperature_determine_levels(dlh, usr_warn, usr_crit,
usr_warn_lower,
# Use device's levels if present, otherwise yours
elif dlh == "devdefault":
- if dev_warn is not None and dev_crit is None:
+ if dev_warn is not None and dev_crit is not None:
warn, crit = dev_warn, dev_crit
else:
warn, crit = usr_warn, usr_crit