Skip to content

Commit bdd2d93

Browse files
committed
Revert r88197. I'll refix correctly once there is a test.
1 parent 14eb4c3 commit bdd2d93

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/email/generator.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,8 @@ def _write_headers(self, msg):
377377
def _handle_text(self, msg):
378378
# If the string has surrogates the original source was bytes, so
379379
# just write it back out.
380-
payload = msg.get_payload()
381-
if payload is None:
382-
return
383-
if _has_surrogates(payload):
384-
self.write(payload)
380+
if _has_surrogates(msg._payload):
381+
self.write(msg._payload)
385382
else:
386383
super(BytesGenerator,self)._handle_text(msg)
387384

0 commit comments

Comments
 (0)