From 506eac99d604d8da41b4edf9e2cd840cc31c7cf0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 2 Jan 2013 10:22:25 -0500 Subject: [PATCH] send-nagios-notification: Use a codeblock rather than a block quote. This ensures that Humbug receives the verbatim text of the Nagios body, rather than a slightly modified version. Tested by running manually. (imported from commit 7e0eea0b230fd8c5552860acfb7372099598f036) --- bots/send-nagios-notification | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/send-nagios-notification b/bots/send-nagios-notification index fc41a59..3caa0ca 100755 --- a/bots/send-nagios-notification +++ b/bots/send-nagios-notification @@ -40,8 +40,8 @@ msg['content'] = '**%s**: %s is %s' % (opts.type, thing, opts.state) # We will be more conservative and handle just this one escape sequence. output = (opts.output + '\n' + opts.long_output.replace(r'\n', '\n')).strip() if output: - # Block-quote any command output. - msg['content'] += ('\n\n' + '\n'.join('> ' + ln for ln in output.splitlines())) + # Put any command output in a code block. + msg['content'] += ('\n\n~~~~\n' + output + "\n~~~~\n") client = humbug.Client( email = 'humbug+nagios@humbughq.com',