Skip to content

Commit

Permalink
remove workaround for python issue
Browse files Browse the repository at this point in the history
that was solved upstream: https://bugs.python.org/issue14983
  • Loading branch information
pazz committed Aug 2, 2018
1 parent 2c4a2ce commit 834a658
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions alot/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,6 @@ def email_as_string(mail):
g = Generator(fp, mangle_from_=False, maxheaderlen=78)
g.flatten(mail)
as_string = RFC3156_canonicalize(fp.getvalue())

if isinstance(mail, MIMEMultipart):
# Get the boundary for later
boundary = mail.get_boundary()

# Workaround for http://bugs.python.org/issue14983:
# Insert a newline before the outer mail boundary so that other mail
# clients can verify the signature when sending an email which contains
# attachments.
as_string = re.sub(r'--(\r\n)--' + boundary,
r'--\g<1>\g<1>--' + boundary,
as_string, flags=re.MULTILINE)

return as_string


Expand Down

0 comments on commit 834a658

Please sign in to comment.