From: R. David Murray Date: Wed, 26 Jan 2011 02:31:37 +0000 (+0000) Subject: Revert r88197. I'll refix correctly once there is a test. X-Git-Tag: v3.2rc2~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdd2d93bfebbfcc90b2e08c7400b4b41814f70e7;p=thirdparty%2FPython%2Fcpython.git Revert r88197. I'll refix correctly once there is a test. --- diff --git a/Lib/email/generator.py b/Lib/email/generator.py index e382b8522bb9..9d33f1cb870a 100644 --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -377,11 +377,8 @@ class BytesGenerator(Generator): 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)