diff options
author | R. David Murray <rdmurray@bitdance.com> | 2011-01-26 02:31:37 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2011-01-26 02:31:37 (GMT) |
commit | bdd2d93bfebbfcc90b2e08c7400b4b41814f70e7 (patch) | |
tree | 59a38952ae009db4a11553f4649348a1bb497396 /Lib/email | |
parent | 14eb4c356e97c6099f34f687d107e1f7ea7a5f90 (diff) | |
download | cpython-bdd2d93bfebbfcc90b2e08c7400b4b41814f70e7.zip cpython-bdd2d93bfebbfcc90b2e08c7400b4b41814f70e7.tar.gz cpython-bdd2d93bfebbfcc90b2e08c7400b4b41814f70e7.tar.bz2 |
Revert r88197. I'll refix correctly once there is a test.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/generator.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/email/generator.py b/Lib/email/generator.py index e382b85..9d33f1c 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) |