Commit 8f870cc5 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

notify: Do not break overly long words



Fixes FS#46937.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent e45609cf
......@@ -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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment