Module: check_mk
Branch: master
Commit: 70b618fe6b81665c3b5027e17986d352e5218453
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=70b618fe6b8166…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Sep 11 14:47:19 2018 +0200
6494 FIX win_video: Fixed crash if driver date is missing
Change-Id: I2244619e294ec62002a0e7ccd15d5e2f93112218
---
.werks/6494 | 10 ++++++++++
inventory/win_video | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6494 b/.werks/6494
new file mode 100644
index 0000000..9c70faf
--- /dev/null
+++ b/.werks/6494
@@ -0,0 +1,10 @@
+Title: win_video: Fixed crash if driver date is missing
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1536669999
+Class: fix
+
+
diff --git a/inventory/win_video b/inventory/win_video
index e56ed96..51cd04c 100644
--- a/inventory/win_video
+++ b/inventory/win_video
@@ -60,7 +60,10 @@ def inv_win_video(info):
elif varname == "DriverVersion":
array["driver_version"] = value
elif varname == "DriverDate":
- array["driver_date"] =
int(time.mktime(time.strptime(value.split(".")[0], "%Y%m%d%H%M%S")))
+ try:
+ array["driver_date"] =
int(time.mktime(time.strptime(value.split(".")[0], "%Y%m%d%H%M%S")))
+ except ValueError:
+ pass
elif varname == "AdapterRAM":
array["graphic_memory"] = saveint(value)