Module: check_mk
Branch: master
Commit: 4f6ad1be25e61c32c05a808da8e139a3b5d506df
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f6ad1be25e61c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 18 17:14:32 2014 +0100
INV: nicer parsing of dmidecode
---
inventory/dmidecode | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/inventory/dmidecode b/inventory/dmidecode
index 424b1d4..d29ded9 100644
--- a/inventory/dmidecode
+++ b/inventory/dmidecode
@@ -221,12 +221,14 @@ def inv_dmidecode_parse_mem_device(lines):
device["size"] = dmidecode_parse_size(device["size"])
array["devices"].append(device)
+
def inv_dmidecode_parse_generic(node, lines, keyinfo):
if type(node) == str:
node = inv_tree(node)
for line in lines:
if line[0] in keyinfo:
- node[keyinfo[line[0]]] = line[1]
+ if line[1] != "Not Specified":
+ node[keyinfo[line[0]]] = line[1]
def dmidecode_parse_size(v): # into Bytes (int)