From 7e550fcb9da626e21e990547b9253d908391b0c7 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 25 Feb 2016 15:38:28 -0800 Subject: [PATCH] Email debug mode on Python 3 was printing bytestring representation for subject body There's nothing useful about seeing b'foo\nbar\nbaz' printing to stdout. That's not what the user should get! --- mediagoblin/tools/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/tools/mail.py b/mediagoblin/tools/mail.py index ab3e0eaa..74e59fb3 100644 --- a/mediagoblin/tools/mail.py +++ b/mediagoblin/tools/mail.py @@ -137,7 +137,7 @@ def send_email(from_addr, to_addrs, subject, message_body): print("To addresses: %s" % message['To']) print("Subject: %s" % message['Subject']) print("-- Body: --") - print(message.get_payload(decode=True)) + print(message_body) return mhost.sendmail(from_addr, to_addrs, message.as_string()) -- 2.25.1