Module: check_mk
Branch: master
Commit: 60ff7f8b9efc8714e6c383c6dbd473af2b9d976e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60ff7f8b9efc87…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Apr 11 10:43:55 2017 +0200
4583 FIX netextreme_psu: Fixed empty data handling
Change-Id: I16abd72a1b9982b3e3493369245b21949efdbaf9
---
.werks/4583 | 11 +++++++++++
checks/netextreme_psu | 5 ++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/4583 b/.werks/4583
new file mode 100644
index 0000000..88427ae
--- /dev/null
+++ b/.werks/4583
@@ -0,0 +1,11 @@
+Title: netextreme_psu: Fixed empty data handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1491900165
+
+
diff --git a/checks/netextreme_psu b/checks/netextreme_psu
index 83812e2..0967bd5 100644
--- a/checks/netextreme_psu
+++ b/checks/netextreme_psu
@@ -36,7 +36,10 @@ factory_settings["netextreme_psu_default_levels"] = {
def parse_netextreme_psu(info):
- return { "1" : {"power" : float(info[0][0]) * pow(10,
int(info[0][1])) }}
+ try:
+ return { "1" : {"power" : float(info[0][0]) * pow(10,
int(info[0][1])) }}
+ except (IndexError, ValueError):
+ return {}
check_info['netextreme_psu'] = {