From 7da8f06df09aff2f45df9ebcda40e9078a6ab92c Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Fri, 4 Jun 2010 16:11:08 +0000 Subject: #4768: store base64 encoded email body parts as text, not binary. Patch and tests by Forest Bond. --- Lib/email/encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/email/encoders.py') diff --git a/Lib/email/encoders.py b/Lib/email/encoders.py index 20feb026fd..0ea441d963 100644 --- a/Lib/email/encoders.py +++ b/Lib/email/encoders.py @@ -29,7 +29,7 @@ def encode_base64(msg): Also, add an appropriate Content-Transfer-Encoding header. """ orig = msg.get_payload() - encdata = _bencode(orig) + encdata = str(_bencode(orig), 'ascii') msg.set_payload(encdata) msg['Content-Transfer-Encoding'] = 'base64' -- cgit v1.2.1