From fc39b538373a6b7cf9e33944061e499e2ac952b7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 21 Nov 2009 04:04:37 +0000 Subject: [PATCH] Bug #293448 - Fix TypeError when sending mail with python3, triggered by this issue: http://bugs.python.org/issue6521. Thanks to Albert W. Hopkins for this patch. (trunk r14844) svn path=/main/branches/2.1.7/; revision=14860 --- pym/portage/mail.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pym/portage/mail.py b/pym/portage/mail.py index 42ed43b83..0cc250085 100644 --- a/pym/portage/mail.py +++ b/pym/portage/mail.py @@ -23,7 +23,9 @@ if sys.hexversion >= 0x3000000: if sys.hexversion >= 0x3000000: def TextMessage(_text): - return MIMEText(_text, _charset="UTF-8") + mimetext = MIMEText(_text) + mimetext.set_charset("UTF-8") + return mimetext else: TextMessage = MIMEText -- 2.26.2