From d16f012f842e5719ff9fb90e217efc0f795853f2 Mon Sep 17 00:00:00 2001 From: Cheryl Sabella Date: Thu, 18 Oct 2018 20:21:47 -0400 Subject: 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. --- Lib/mailbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/mailbox.py') diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 056251dce0..5b4e86419f 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.""" -- cgit v1.2.1