[checkmk-commits] Check_MK Git: check_mk: #2179 FIX apc_symmetra: Fixed regression introduced with last release when output state is empty

Lars Michelsen lm at mathias-kettner.de
Wed Apr 15 09:33:47 CEST 2015


Module: check_mk
Branch: master
Commit: 91484912146a52bba613a754683e69d849d2e1ea
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91484912146a52bba613a754683e69d849d2e1ea

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Wed Apr 15 09:33:40 2015 +0200

#2179 FIX apc_symmetra: Fixed regression introduced with last release when output state is empty

---

 .werks/2179         |   10 ++++++++++
 ChangeLog           |    1 +
 checks/apc_symmetra |    5 ++++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/.werks/2179 b/.werks/2179
new file mode 100644
index 0000000..5092172
--- /dev/null
+++ b/.werks/2179
@@ -0,0 +1,10 @@
+Title: apc_symmetra: Fixed regression introduced with last release when output state is empty
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1429083180
+
+
diff --git a/ChangeLog b/ChangeLog
index c441a0f..d0b3bf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -326,6 +326,7 @@
     * 2064 FIX: windows agent: crash.log now uses \r\n as newline
     * 2202 FIX: hr_fs: Remove Label:... from mount point, replace \ with /...
             NOTE: Please refer to the migration notes!
+    * 2179 FIX: apc_symmetra: Fixed regression introduced with last release when output state is empty
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index 9cffafd..dd89bf1 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -65,7 +65,10 @@ def check_apc(item, params, info):
     time_remaining, calib_result, output_load = [ saveint(x) for x in info[0][:13] ]
     last_diag_date = info[0][13]
 
-    output_state_bitmask = int(info[0][14], 2) # string contains a bitmask, convert to int
+    if info[0][14] != '':
+        output_state_bitmask = int(info[0][14], 2) # string contains a bitmask, convert to int
+    else:
+        output_state_bitmask = 0
     self_test_in_progress = output_state_bitmask & 1<<35 != 0
 
     # convert old format tuple to dict



More information about the checkmk-commits mailing list