[Python-checkins] r88199 - python/branches/py3k/Lib/email/generator.py

r.david.murray python-checkins at python.org
Wed Jan 26 03:31:37 CET 2011


Author: r.david.murray
Date: Wed Jan 26 03:31:37 2011
New Revision: 88199

Log:
Revert r88197.  I'll refix correctly once there is a test.


Modified:
   python/branches/py3k/Lib/email/generator.py

Modified: python/branches/py3k/Lib/email/generator.py
==============================================================================
--- python/branches/py3k/Lib/email/generator.py	(original)
+++ python/branches/py3k/Lib/email/generator.py	Wed Jan 26 03:31:37 2011
@@ -377,11 +377,8 @@
     def _handle_text(self, msg):
         # If the string has surrogates the original source was bytes, so
         # just write it back out.
-        payload = msg.get_payload()
-        if payload is None:
-            return
-        if _has_surrogates(payload):
-            self.write(payload)
+        if _has_surrogates(msg._payload):
+            self.write(msg._payload)
         else:
             super(BytesGenerator,self)._handle_text(msg)
 


More information about the Python-checkins mailing list