From: Zac Medico Date: Sat, 21 Nov 2009 04:04:37 +0000 (-0000) Subject: Bug #293448 - Fix TypeError when sending mail with python3, triggered by this X-Git-Tag: v2.1.7.6~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc39b538373a6b7cf9e33944061e499e2ac952b7;p=portage.git 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 --- 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