From: Zac Medico Date: Tue, 17 Nov 2009 02:26:24 +0000 (-0000) Subject: Bug #293448 - Fix TypeError when sending mail with python3, triggered by this X-Git-Tag: v2.2_rc51~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4213faf8dd3b8f389a71cab6d2c69da7b907fec1;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. svn path=/main/trunk/; revision=14844 --- 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