diff options
author | Guido van Rossum <guido@python.org> | 2007-08-30 03:46:43 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-30 03:46:43 +0000 |
commit | 6933bfac37623cbc2f17ef0832ee4d1d22c855c7 (patch) | |
tree | 87654f418e405c01f9ab51c43ac847b7936a56e9 /Lib/email/generator.py | |
parent | 3d7c8c2f21163d3d829b8cb12e6d220226fc3c80 (diff) | |
download | cpython-6933bfac37623cbc2f17ef0832ee4d1d22c855c7.tar.gz |
Oops. I copied a slightly older version of the email package from the sandbox.
This should restore the email package in the py3k branch to exactly what's in
the sandbox.
This wipes out 1-2 fixes made post-copy, which I'll re-apply shortly.
Diffstat (limited to 'Lib/email/generator.py')
-rw-r--r-- | Lib/email/generator.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/email/generator.py b/Lib/email/generator.py index 1352ede9e1..2d6a1917a1 100644 --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -133,12 +133,8 @@ class Generator: def _write_headers(self, msg): for h, v in msg.items(): print('%s:' % h, end=' ', file=self._fp) - if self._maxheaderlen == 0: - # Explicit no-wrapping - print(v, file=self._fp) - elif isinstance(v, Header): - # Header instances know what to do - print(v.encode(), file=self._fp) + if isinstance(v, Header): + print(v.encode(maxlinelen=self._maxheaderlen), file=self._fp) else: # Header's got lots of smarts, so use it. header = Header(v, maxlinelen=self._maxheaderlen, |