From 963fb9f2e6fb658a0e52326c699fb9df4325eb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20T=C3=B3th?= Date: Sat, 13 May 2023 12:40:31 +0200 Subject: [PATCH] email_administrator.py: fix report formatting (#2249) --- management/email_administrator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management/email_administrator.py b/management/email_administrator.py index 8ed6e2a8..c87eda40 100755 --- a/management/email_administrator.py +++ b/management/email_administrator.py @@ -29,7 +29,7 @@ content = sys.stdin.read().strip() # If there's nothing coming in, just exit. if content == "": - sys.exit(0) + sys.exit(0) # create MIME message msg = MIMEMultipart('alternative') @@ -41,7 +41,7 @@ msg['From'] = "\"%s\" <%s>" % (env['PRIMARY_HOSTNAME'], admin_addr) msg['To'] = admin_addr msg['Subject'] = "[%s] %s" % (env['PRIMARY_HOSTNAME'], subject) -content_html = "
{}
".format(html.escape(content)) +content_html = '
{}
'.format(html.escape(content)) msg.attach(MIMEText(content, 'plain')) msg.attach(MIMEText(content_html, 'html'))