projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3df33c
)
Preserve previous usage of MIMEText constructor under python2, since it's
author
Zac Medico
<zmedico@gentoo.org>
Mon, 16 Nov 2009 00:30:24 +0000
(
00:30
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 16 Nov 2009 00:30:24 +0000
(
00:30
-0000)
known to work this way. (trunk r14807)
svn path=/main/branches/2.1.7/; revision=14830
pym/portage/mail.py
patch
|
blob
|
history
diff --git
a/pym/portage/mail.py
b/pym/portage/mail.py
index 64774cdacbe3f8266e9c0b4d34d79503183e998d..96bb38e833a60d752fc195dccfe6d6087fbb3150 100644
(file)
--- a/
pym/portage/mail.py
+++ b/
pym/portage/mail.py
@@
-21,8
+21,11
@@
import portage
if sys.hexversion >= 0x3000000:
basestring = str
-def TextMessage(_text):
- return MIMEText(_text, _charset="UTF-8")
+if sys.hexversion >= 0x3000000:
+ def TextMessage(_text):
+ return MIMEText(_text, _charset="UTF-8")
+else:
+ TextMessage = MIMEText
def create_message(sender, recipient, subject, body, attachments=None):