projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deff8d5
)
Preserve previous usage of MIMEText constructor under python2, since it's
author
Zac Medico
<zmedico@gentoo.org>
Wed, 11 Nov 2009 06:46:12 +0000
(06:46 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 11 Nov 2009 06:46:12 +0000
(06:46 -0000)
known to work this way.
svn path=/main/trunk/; revision=14807
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):