Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
aurweb
Commits
8f870cc5
Commit
8f870cc5
authored
Dec 12, 2015
by
Lukas Fleischer
Browse files
notify: Do not break overly long words
Fixes FS#46937. Signed-off-by:
Lukas Fleischer
<
lfleischer@archlinux.org
>
parent
e45609cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/notify.py
View file @
8f870cc5
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment