Module: check_mk
Branch: master
Commit: 864941e5772950ad8392a2de972ed73d9733e5cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=864941e5772950…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed Jul 31 15:55:32 2013 +0200
fixed parsing problems
---
checks/emcvnx_hwstatus | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/checks/emcvnx_hwstatus b/checks/emcvnx_hwstatus
index ee7c96a..2059bcc 100644
--- a/checks/emcvnx_hwstatus
+++ b/checks/emcvnx_hwstatus
@@ -62,13 +62,14 @@
def parse_emcvnx_hwstatus(info):
parsed = {}
for line in info:
- if line[1] == "Bus" and line[3] == "Enclosure":
+ if len(line) > 3 and line[1] == "Bus" and line[3] ==
"Enclosure":
encid = line[2] + "/" + line[4]
enc = []
parsed[encid] = enc
- elif line[6] == "State:":
+ elif len(line) > 6 and line[6] == "State:":
device = line[4] + " " + line[5]
state = line[-1]
+ parsed[encid] = [device, state]
return parsed