Module: check_mk
Branch: master
Commit: 7456ecdf3e0fa8b526281cc7d96dc0a53a64479d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7456ecdf3e0fa8…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Sep 8 15:01:14 2016 +0200
3870 elphase.include: more robust against none type params
---
.werks/3870 | 10 ++++++++++
ChangeLog | 1 +
checks/elphase.include | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/3870 b/.werks/3870
new file mode 100644
index 0000000..f55c043
--- /dev/null
+++ b/.werks/3870
@@ -0,0 +1,10 @@
+Title: elphase.include: more robust against none type params
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1473338482
+
+
diff --git a/ChangeLog b/ChangeLog
index 6748b8c..c51f044 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -377,6 +377,7 @@
* 3836 FIX: Fixed perfometer in kentix multisensor rack...
* 3848 FIX: megaraid_pdisks: Handle "rebuild" state as WARNING instead of
UNKNOWN
* 3849 FIX: check_cpu_peaks: Fixed broken active check
+ * 3870 FIX: elphase.include: more robust against none type params
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/elphase.include b/checks/elphase.include
index 2d6495b..fe450ab 100644
--- a/checks/elphase.include
+++ b/checks/elphase.include
@@ -49,6 +49,9 @@ def check_elphase(item, params, parsed):
class Bounds:
Lower, Upper, Both = range(3)
+ if params is None:
+ params = {}
+
for what, title, unit, bound, factor in [
( "voltage", "Voltage", " V",
Bounds.Lower, 1),
( "current", "Current", " A",
Bounds.Upper, 1),