Module: check_mk
Branch: master
Commit: 9ae41d13a7a003547d850ad9ac467d885c951cf4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ae41d13a7a003…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jan 19 12:02:32 2016 +0100
#2828 FIX win_disks: now able to handle disks with missing size or media type information
---
.werks/2828 | 9 +++++++++
ChangeLog | 1 +
inventory/win_disks | 6 ++++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/2828 b/.werks/2828
new file mode 100644
index 0000000..1765109
--- /dev/null
+++ b/.werks/2828
@@ -0,0 +1,9 @@
+Title: win_disks: now able to handle disks with missing size or media type information
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453201303
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3da32c6..248f06a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -284,6 +284,7 @@
* 2714 FIX: Fixed visibility of folding arrows by making them dark
* 2439 FIX: solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2
SERVER...
* 2827 FIX: win_disks, win_video: now able to detect multiple instances
+ * 2828 FIX: win_disks: now able to handle disks with missing size or media type
information
1.2.7i3:
diff --git a/inventory/win_disks b/inventory/win_disks
index aa04853..1884f99 100644
--- a/inventory/win_disks
+++ b/inventory/win_disks
@@ -88,9 +88,11 @@ def inv_win_disks(info):
elif varname == "SerialNumber":
array["serial"] = value
elif varname == "Size":
- array["size"] = int(value)
+ if value != "":
+ array["size"] = int(value)
elif varname == "MediaType":
- array["type"] = value
+ if value != "":
+ array["type"] = value
elif varname == "Signature":
if value != "":
array["signature"] = int(value)