From 9604e66660bfe5066a88e3eb560a5846c620e8de Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 30 Aug 2007 03:46:43 +0000 Subject: 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. --- Lib/email/generator.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Lib/email/generator.py') 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, -- cgit v1.2.1