summaryrefslogtreecommitdiffstats
path: root/Lib/mailbox.py
diff options
context:
space:
mode:
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 /Lib/mailbox.py
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 (limited to 'Lib/mailbox.py')
-rw-r--r--Lib/mailbox.py2
1 files changed, 1 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."""