From 7e452fdfb02ace8c207af0a6a5c7d7d184b7593a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 16 May 2018 17:57:08 +0200 Subject: notify.py: Do not add stray newlines Make sure we are consistent with not adding newlines at the end of notification emails. Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index 693abffc..4fed6ad0 100755 --- a/aurweb/scripts/notify.py +++ b/aurweb/scripts/notify.py @@ -35,7 +35,7 @@ def send_notification(to, subject, body, refs, headers={}): if refs: body = wrapped + '\n' + refs else: - body = wrapped + body = wrapped.rstrip() for recipient in to: msg = email.mime.text.MIMEText(body, 'plain', 'utf-8') @@ -304,7 +304,7 @@ def comaintainer_add(conn, pkgbase_id, uid): subject = 'AUR Co-Maintainer Notification for %s' % (pkgbase) body = 'You were added to the co-maintainer list of %s [1].' % (pkgbase) - refs = '[1] ' + pkgbase_uri + '\n' + refs = '[1] ' + pkgbase_uri send_notification(to, subject, body, refs) @@ -318,7 +318,7 @@ def comaintainer_remove(conn, pkgbase_id, uid): subject = 'AUR Co-Maintainer Notification for %s' % (pkgbase) body = ('You were removed from the co-maintainer list of %s [1].' % (pkgbase)) - refs = '[1] ' + pkgbase_uri + '\n' + refs = '[1] ' + pkgbase_uri send_notification(to, subject, body, refs) @@ -378,7 +378,7 @@ def request_open(conn, uid, reqid, reqtype, pkgbase_id, merge_into=None): (user, reqtype, pkgbase) body += '\n\n' + text refs = '[1] ' + user_uri + '\n' - refs += '[2] ' + pkgbase_uri + '\n' + refs += '[2] ' + pkgbase_uri thread_id = '' # Use a deterministic Message-ID for the first email referencing a request. headers = headers_msgid(thread_id) -- cgit v1.2.3-24-g4f1b