Module: check_mk
Branch: master
Commit: 24a050afba5eb8f1ddc0ebf143c3522ecbbc502d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=24a050afba5eb8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed May 4 14:45:29 2016 +0200
3565 FIX wmi checks: Fixed deprecation warning when WMI keys can not be found in agent
output
---
.werks/3565 | 10 ++++++++++
ChangeLog | 1 +
checks/wmi.include | 3 +--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/3565 b/.werks/3565
new file mode 100644
index 0000000..76592fc
--- /dev/null
+++ b/.werks/3565
@@ -0,0 +1,10 @@
+Title: wmi checks: Fixed deprecation warning when WMI keys can not be found in agent
output
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1462365900
+
+
diff --git a/ChangeLog b/ChangeLog
index 3d02302..ceaa7c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -207,6 +207,7 @@
* 3467 FIX: logwatch: fix exception in case the logfile name contains non-ascii
characters
* 3563 FIX: fortigate_sslvpn: Fixed broken manpage
* 3564 FIX: logwatch_ec: Fixed discovery when Logwatch Event Console Forwarding rule
is set to "No forwarding"
+ * 3565 FIX: wmi checks: Fixed deprecation warning when WMI keys can not be found in
agent output
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/wmi.include b/checks/wmi.include
index 425f75e..af1e5a3 100644
--- a/checks/wmi.include
+++ b/checks/wmi.include
@@ -94,8 +94,7 @@ def parse_wmi_table(info, key="Name"):
try:
col_index = self.__headers[column]
except KeyError, e:
- raise KeyError(e.message + " missing, valid keys: "
- + ", ".join(self.__headers.keys()))
+ raise KeyError("%s missing, valid keys: %s" % (e, ",
".join(self.__headers.keys())))
return self.__rows[row_index][col_index]