Module: check_mk
Branch: master
Commit: 613ac6ada3c66c057d15629908d9d841764fb0db
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=613ac6ada3c66c…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Mar 16 15:41:59 2016 +0100
brocade_optical: fixed handling of unsupported reading format
---
checks/brocade_optical | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/checks/brocade_optical b/checks/brocade_optical
index 3597238..25a3784 100644
--- a/checks/brocade_optical
+++ b/checks/brocade_optical
@@ -97,8 +97,11 @@ def parse_brocade_optical(info):
if value_string == 'N/A' or value_string.lower() == "not
supported":
return None, None
- val, unit, status = value_string.split()
- return float(val), status
+ try:
+ val, unit, status = value_string.split()
+ return float(val), status
+ except ValueError:
+ return None, None
result = {}