[checkmk-commits] Check_MK Git: check_mk: #2197 FIX win_reg_uninstall: Fix exception in case of invalid output line

Mathias Kettner mk at mathias-kettner.de
Fri Apr 10 15:11:06 CEST 2015


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

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Fri Apr 10 15:09:39 2015 +0200

#2197 FIX win_reg_uninstall: Fix exception in case of invalid output line

Might be cased by a software with vertical bars in the name. This happended
for <tt>Symantec Backup Exec Remote Agent for Windows</tt>. The reason is
unclear.

---

 .werks/2197                 |   12 ++++++++++++
 ChangeLog                   |    1 +
 inventory/win_reg_uninstall |    3 +++
 3 files changed, 16 insertions(+)

diff --git a/.werks/2197 b/.werks/2197
new file mode 100644
index 0000000..610ca76
--- /dev/null
+++ b/.werks/2197
@@ -0,0 +1,12 @@
+Title: win_reg_uninstall: Fix exception in case of invalid output line
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428671316
+
+Might be cased by a software with vertical bars in the name. This happended
+for <tt>Symantec Backup Exec Remote Agent for Windows</tt>. The reason is
+unclear.
diff --git a/ChangeLog b/ChangeLog
index bc3240a..a2308b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -480,6 +480,7 @@
     * 2147 FIX: Fixed exception in HW-/SW-Inventory GUI with special characters in inventorized data...
     * 2148 FIX: win_os: Fixed inventory of OS with older powershell versions
     * 2108 FIX: win_bios win_disks win_system win_video: these inventory checks can now handle colons in the output
+    * 2197 FIX: win_reg_uninstall: Fix exception in case of invalid output line...
 
 
 1.2.6b1:
diff --git a/inventory/win_reg_uninstall b/inventory/win_reg_uninstall
index 1cd4525..63c3581 100644
--- a/inventory/win_reg_uninstall
+++ b/inventory/win_reg_uninstall
@@ -31,6 +31,9 @@
 def inv_win_reg_uninstall(info):
     paclist = inv_tree("software.packages:")
     for line in info:
+        if len(line) != 7:
+            continue
+
         display_name, publisher, path, pacname, version, estimated_size, date = line
         install_date = ""
         if re.match("^20\d{6}", date):



More information about the checkmk-commits mailing list