Skip to content

Commit 0e07b96

Browse files
committed
Removed def _handle_multipart_signed from generator.py file to solve issue #99533 where EmailMessage behaves differently when being set to multipart/signed mimetype
1 parent 53d9cd9 commit 0e07b96

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Lib/email/generator.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,6 @@ def _handle_multipart(self, msg):
313313
epilogue = msg.epilogue
314314
self._write_lines(epilogue)
315315

316-
def _handle_multipart_signed(self, msg):
317-
# The contents of signed parts has to stay unmodified in order to keep
318-
# the signature intact per RFC1847 2.1, so we disable header wrapping.
319-
# RDM: This isn't enough to completely preserve the part, but it helps.
320-
p = self.policy
321-
self.policy = p.clone(max_line_length=0)
322-
try:
323-
self._handle_multipart(msg)
324-
finally:
325-
self.policy = p
326-
327316
def _handle_message_delivery_status(self, msg):
328317
# We can't just write the headers directly to self's file object
329318
# because this will leave an extra newline between the last header

0 commit comments

Comments
 (0)