[Python-checkins] python/dist/src/Lib/email Header.py,1.20,1.21

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Thu, 06 Mar 2003 12:33:08 -0800


Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv22444

Modified Files:
	Header.py 
Log Message:
_split_ascii(): In the clause where curlen + partlen > maxlen, if the
part itself is longer than maxlen, and we aren't already splitting on
whitespace, then we recursively split the part on whitespace and
append that to the this list.


Index: Header.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Header.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Header.py	6 Mar 2003 16:10:30 -0000	1.20
--- Header.py	6 Mar 2003 20:33:04 -0000	1.21
***************
*** 457,461 ****
                  if this:
                      lines.append(joiner.join(this) + eol)
!                 this = [part]
                  linelen = wslen + partlen
                  maxlen = restlen
--- 457,468 ----
                  if this:
                      lines.append(joiner.join(this) + eol)
!                 # If this part is longer than maxlen and we aren't already
!                 # splitting on whitespace, try to recursively split this line
!                 # on whitespace.
!                 if partlen > maxlen and ch <> ' ':
!                     this = [_split_ascii(part, maxlen, restlen,
!                                          continuation_ws, ' ')]
!                 else:
!                     this = [part]
                  linelen = wslen + partlen
                  maxlen = restlen