public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14830 - main/branches/2.1.7/pym/portage
@ 2009-11-16  0:30 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-11-16  0:30 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-11-16 00:30:24 +0000 (Mon, 16 Nov 2009)
New Revision: 14830

Modified:
   main/branches/2.1.7/pym/portage/mail.py
Log:
Preserve previous usage of MIMEText constructor under python2, since it's
known to work this way. (trunk r14807)

Modified: main/branches/2.1.7/pym/portage/mail.py
===================================================================
--- main/branches/2.1.7/pym/portage/mail.py	2009-11-16 00:30:08 UTC (rev 14829)
+++ main/branches/2.1.7/pym/portage/mail.py	2009-11-16 00:30:24 UTC (rev 14830)
@@ -21,8 +21,11 @@
 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):
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-16  0:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16  0:30 [gentoo-commits] portage r14830 - main/branches/2.1.7/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox