From 170a2b7038c872709d4b7ac85554cd137bb4568e Mon Sep 17 00:00:00 2001 From: Yuriy Savinkin Date: Fri, 14 Feb 2025 14:20:28 +0300 Subject: [PATCH] Fix parenthesis order Signed-off-by: Yuriy Savinkin --- awx/main/models/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/models/notifications.py b/awx/main/models/notifications.py index 97a4f1ae63b6..307755ec2bba 100644 --- a/awx/main/models/notifications.py +++ b/awx/main/models/notifications.py @@ -488,13 +488,13 @@ def build_notification_message(self, nt, status): try: msg = env.from_string(msg_template).render(**context) except (TemplateSyntaxError, UndefinedError, SecurityError) as e: - msg = '\r\n'.join([e.message, ''.join(traceback.format_exception(None, e, e.__traceback__).replace('\n', '\r\n'))]) + msg = '\r\n'.join([e.message, ''.join(traceback.format_exception(None, e, e.__traceback__)).replace('\n', '\r\n')]) if body_template: try: body = env.from_string(body_template).render(**context) except (TemplateSyntaxError, UndefinedError, SecurityError) as e: - body = '\r\n'.join([e.message, ''.join(traceback.format_exception(None, e, e.__traceback__).replace('\n', '\r\n'))]) + body = '\r\n'.join([e.message, ''.join(traceback.format_exception(None, e, e.__traceback__)).replace('\n', '\r\n')]) # https://datatracker.ietf.org/doc/html/rfc2822#section-2.2 # Body should have at least 2 CRLF, some clients will interpret