Module: check_mk
Branch: master
Commit: 5421c247679f9b2b3c8e5e3d5748ba90782953cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5421c247679f9b…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Jun 8 14:08:27 2016 +0200
messages from notification scripts are now passed through to the caller (see werk #8330)
---
modules/notify.py | 1 +
notifications/mail | 2 ++
2 files changed, 3 insertions(+)
diff --git a/modules/notify.py b/modules/notify.py
index 5353e1d..fbe7ffc 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -1185,6 +1185,7 @@ def call_notification_script(plugin, plugin_context):
line = p.stdout.readline()
if line != '':
plugin_log("Output: %s" %
line.rstrip().decode('utf-8'))
+ sys.stdout.write(line)
else:
break
# the stdout is closed but the return code may not be available just yet - wait
for the
diff --git a/notifications/mail b/notifications/mail
index e282d7a..6ef6644 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -500,6 +500,8 @@ def send_mail_smtp_impl(message, target, host, from_address,
context):
# evil hack: the smtplib doesn't allow access to the reply code/message
# in case of success. But we want it!
+ conn.last_code = 0
+ conn.last_repl = ""
conn.getreply = types.MethodType(getreply_wrapper, conn)
if encryption == "STARTTLS":