diff options
author | Guido van Rossum <guido@python.org> | 2007-08-30 03:46:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-30 03:46:43 (GMT) |
commit | 9604e66660bfe5066a88e3eb560a5846c620e8de (patch) | |
tree | 445e4bdae6ea20847bdfa014ebdab7a1b7eb2233 /Lib/email/generator.py | |
parent | 2c440a1086e182796a52eeca1fe7c2baa441591d (diff) | |
download | cpython-9604e66660bfe5066a88e3eb560a5846c620e8de.zip cpython-9604e66660bfe5066a88e3eb560a5846c620e8de.tar.gz cpython-9604e66660bfe5066a88e3eb560a5846c620e8de.tar.bz2 |
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 1352ede..2d6a191 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, |