Module: check_mk
Branch: master
Commit: c41f52f60f19ea2dde18fbe0d1eb9e942185e671
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c41f52f60f19ea…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 17 09:22:39 2017 +0100
4374 FIX check_sql: Fixed exception in verbose mode when querying MSSQL
The check raised a "TypeError: sequence item 0: expected string, int found"
exception.
Change-Id: Ic4bdbedb1704b576ff4a5a40a1cbce4080599930
---
.werks/4374 | 9 +++++++++
active_checks/check_sql | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/4374 b/.werks/4374
new file mode 100644
index 0000000..c81c79b
--- /dev/null
+++ b/.werks/4374
@@ -0,0 +1,9 @@
+Title: check_sql: Fixed exception in verbose mode when querying MSSQL
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.5.0i1
+Date: 1487319719
+Class: fix
+
+The check raised a "TypeError: sequence item 0: expected string, int found"
exception.
diff --git a/active_checks/check_sql b/active_checks/check_sql
index a2079bf..f01e189 100755
--- a/active_checks/check_sql
+++ b/active_checks/check_sql
@@ -224,6 +224,7 @@ try:
sys.stderr.write("Input Values: %s\n" % opt_input)
else:
sys.stderr.write("SQL Statement: %s\n" % opt_sql)
+
if opt_procedure:
outvar = cursor.var(cx_Oracle.STRING)
#opt_input.append("outvar")
@@ -250,7 +251,7 @@ except Exception, e:
if opt_verbose:
- sys.stderr.write("SQL Result:\n %s\n" % " ".join(result))
+ sys.stderr.write("SQL Result:\n %r\n" % result)
try: