summaryrefslogtreecommitdiffstats
path: root/aurweb/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2018-05-16 17:57:08 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2018-05-16 20:10:03 +0200
commit7e452fdfb02ace8c207af0a6a5c7d7d184b7593a (patch)
tree98d8e9cbd0758a12db433f642ce167d18f68c1df /aurweb/scripts
parent4b8b2e3eb139518ea1abd5875135bb39a9f0c187 (diff)
downloadaur-7e452fdfb02ace8c207af0a6a5c7d7d184b7593a.tar.gz
aur-7e452fdfb02ace8c207af0a6a5c7d7d184b7593a.tar.xz
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 <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb/scripts')
-rwxr-xr-xaurweb/scripts/notify.py8
1 files 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 = '<pkg-request-' + reqid + '@aur.archlinux.org>'
# Use a deterministic Message-ID for the first email referencing a request.
headers = headers_msgid(thread_id)