From 0f99d2b5e69f2797cfdd3c239e350a5a069392ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Gu=C3=B0j=C3=B3n=20Sigur=C3=B0sson?= Date: Wed, 8 Sep 2010 16:24:34 +0000 Subject: [PATCH] --escape-newlines added --- check_eva/trunk/check_eva.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_eva/trunk/check_eva.py b/check_eva/trunk/check_eva.py index 8e66f81..7fbc7fa 100644 --- a/check_eva/trunk/check_eva.py +++ b/check_eva/trunk/check_eva.py @@ -295,13 +295,13 @@ def end(summary,perfdata,longserviceoutput,nagios_state): global escape_newlines message = "%s - %s" % ( state[nagios_state], summary) - if escape_newlines == True: - lines = message.split('\n') - message = '\\n'.join(lines) if show_perfdata: message = "%s | %s" % ( message, perfdata) if show_longserviceoutput: message = "%s\n%s" % ( message, longserviceoutput.strip()) + if escape_newlines == True: + lines = message.split('\n') + message = '\\n'.join(lines) if nagios_server is not None: try: phone_home(nagios_server,nagios_port, status=nagios_state, message=message, hostname=nagios_myhostname, servicename=mode)