(self, msg)
| 426 | return s.encode('ascii') |
| 427 | |
| 428 | def _write_headers(self, msg): |
| 429 | # This is almost the same as the string version, except for handling |
| 430 | # strings with 8bit bytes. |
| 431 | for h, v in msg.raw_items(): |
| 432 | self._fp.write(self.policy.fold_binary(h, v)) |
| 433 | # A blank line always separates headers from body |
| 434 | self.write(self._NL) |
| 435 | |
| 436 | def _handle_text(self, msg): |
| 437 | # If the string has surrogates the original source was bytes, so |
nothing calls this directly
no test coverage detected