summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-12-12 18:36:04 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2015-12-13 10:22:59 +0100
commit8f870cc5f4e4810e3fdb2346275a2d7f7e3e91e0 (patch)
treec09b9962a830f5bcda05481e59efd8a220c3c133
parente45609cf6645e650b8bafccd6860dec6aa9bb547 (diff)
downloadaurweb-8f870cc5f4e4810e3fdb2346275a2d7f7e3e91e0.tar.xz
notify: Do not break overly long words
Fixes FS#46937. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-xscripts/notify.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/notify.py b/scripts/notify.py
index 9a9cc29..b5bf518 100755
--- a/scripts/notify.py
+++ b/scripts/notify.py
@@ -36,8 +36,10 @@ def headers_reply(thread_id):
return {'In-Reply-To': thread_id, 'References': thread_id}
def send_notification(to, subject, body, refs, headers={}):
- body = '\n'.join([textwrap.fill(line) for line in body.splitlines()])
- body += '\n\n' + refs
+ wrapped = ''
+ for line in body.splitlines():
+ wrapped += textwrap.fill(line, break_long_words=False) + '\n'
+ body = wrapped + '\n' + refs
for recipient in to:
msg = email.mime.text.MIMEText(body, 'plain', 'utf-8')