summaryrefslogtreecommitdiffstats
path: root/Lib/email/message.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-21 14:27:26 (GMT)
committerGitHub <noreply@github.com>2021-06-21 14:27:26 (GMT)
commit20a1495b8a93596b322ea19bb09008db036eb7e6 (patch)
treed2b21729908d7e820856d82983448ddb4ee3ee15 /Lib/email/message.py
parent6614eac843c5dc0f4c2664ef610b81e556e44923 (diff)
downloadcpython-20a1495b8a93596b322ea19bb09008db036eb7e6.zip
cpython-20a1495b8a93596b322ea19bb09008db036eb7e6.tar.gz
cpython-20a1495b8a93596b322ea19bb09008db036eb7e6.tar.bz2
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
(cherry picked from commit 30f7a77f359a0fc6e37988b0f317a77a15d66b7b) Co-authored-by: Dong-hee Na <donghee.na@python.org>
Diffstat (limited to 'Lib/email/message.py')
-rw-r--r--Lib/email/message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 3701b30..db30d9a 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -948,7 +948,7 @@ class MIMEPart(Message):
if policy is None:
from email.policy import default
policy = default
- Message.__init__(self, policy)
+ super().__init__(policy)
def as_string(self, unixfrom=False, maxheaderlen=None, policy=None):
@@ -965,7 +965,7 @@ class MIMEPart(Message):
policy = self.policy if policy is None else policy
if maxheaderlen is None:
maxheaderlen = policy.max_line_length
- return super().as_string(maxheaderlen=maxheaderlen, policy=policy)
+ return super().as_string(unixfrom, maxheaderlen, policy)
def __str__(self):
return self.as_string(policy=self.policy.clone(utf8=True))