Module: check_mk
Branch: master
Commit: 0ec4c0389fc5627e522ca812b29406bbbd1d98c1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0ec4c0389fc562…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 9 17:34:51 2014 +0100
#1753 FIX win_bios: handle case with colons in BIOS version
---
.werks/1753 | 9 +++++++++
ChangeLog | 1 +
inventory/win_bios | 7 ++++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/1753 b/.werks/1753
new file mode 100644
index 0000000..4d84a21
--- /dev/null
+++ b/.werks/1753
@@ -0,0 +1,9 @@
+Title: win_bios: handle case with colons in BIOS version
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418142876
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 7fd6fe9..d4f200b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -302,6 +302,7 @@
* 1547 FIX: win_cpuinfo: fix case where NumberOfCores is missing (Windows 2003)...
* 1552 FIX: mk_inventory.ps1: fix garbled or missing entries by removing bogus binary
zeroes...
* 1752 FIX: win_exefiles: handle case gracefully where no size information is
available
+ * 1753 FIX: win_bios: handle case with colons in BIOS version
inventory:
* 1516 FIX: win_disks: fix exception in case of empty signature
diff --git a/inventory/win_bios b/inventory/win_bios
index c346878..ac199a7 100644
--- a/inventory/win_bios
+++ b/inventory/win_bios
@@ -40,7 +40,12 @@ def inv_win_bios(info):
node = inv_tree("hardware.bios.")
smbios_version = ""
bios_version = ""
- for varname, value in info:
+ for line in info:
+ # Separator : seams not ideal. Some systems have : in the BIOS version
+ if len(line) > 2:
+ line = [ line[0], ":".join(line[1:]) ]
+ varname, value = line
+
varname = re.sub(" *","", varname)
value = re.sub("^ ", "", value)
if varname == "BIOSVersion":