From 4213faf8dd3b8f389a71cab6d2c69da7b907fec1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Nov 2009 02:26:24 +0000 Subject: 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 --- 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 -- cgit v1.2.3-1-g7c22