[Python-checkins] python/dist/src/Lib/email Header.py,1.26,1.27
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Sun, 30 Mar 2003 12:46:49 -0800
Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv26426/email
Modified Files:
Header.py
Log Message:
__unicode__(): Fix the logic for calculating whether to add a
separating space or not between encoded chunks. Closes SF bug
#710498.
Index: Header.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Header.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Header.py 17 Mar 2003 20:36:20 -0000 1.26
--- Header.py 30 Mar 2003 20:46:47 -0000 1.27
***************
*** 216,224 ****
nextcs = charset
if uchunks:
! if lastcs is not None:
! if nextcs is None or nextcs == 'us-ascii':
uchunks.append(USPACE)
nextcs = None
! elif nextcs is not None and nextcs <> 'us-ascii':
uchunks.append(USPACE)
lastcs = nextcs
--- 216,224 ----
nextcs = charset
if uchunks:
! if lastcs not in (None, 'us-ascii'):
! if nextcs in (None, 'us-ascii'):
uchunks.append(USPACE)
nextcs = None
! elif nextcs not in (None, 'us-ascii'):
uchunks.append(USPACE)
lastcs = nextcs