summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
stat options
Period:
Authors:

Commits per author per week (path 'Lib/ftplib.py')

AuthorW11 2026W12 2026W13 2026W14 2026Total
Total00000
>
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-10-19 00:21:47 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2018-10-19 00:21:47 (GMT)
commitd16f012f842e5719ff9fb90e217efc0f795853f2 (patch)
tree669ff81719b7c64c559a6347080f79e44677f891
parent5be00247ae0de2e24dd14bbe4d9ca159434a1710 (diff)
downloadcpython-d16f012f842e5719ff9fb90e217efc0f795853f2.zip
cpython-d16f012f842e5719ff9fb90e217efc0f795853f2.tar.gz
cpython-d16f012f842e5719ff9fb90e217efc0f795853f2.tar.bz2
bpo-31522: mailbox.get_string: pass `from_` parameter to `get_bytes` (#9857)
This allows *from_* to be successfully set to a non-default value when calling mbox.get_string.
Diffstat
-rw-r--r--Lib/mailbox.py2
-rw-r--r--Lib/test/test_mailbox.py28
-rw-r--r--Misc/NEWS.d/next/Library/2018-10-13-18-16-20.bpo-31522.rWBb43.rst1
3 files changed, 30 insertions, 1 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 056251d..5b4e864 100644
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -784,7 +784,7 @@ class _mboxMMDF(_singlefileMailbox):
def get_string(self, key, from_=False):
"""Return a string representation or raise a KeyError."""
return email.message_from_bytes(
- self.get_bytes(key)).as_string(unixfrom=from_)
+ self.get_bytes(key, from_)).as_string(unixfrom=from_)
def get_bytes(self, key, from_=False):
"""Return a string representation or raise a KeyError."""
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py