[Python-checkins] python/dist/src/Lib/email Header.py,1.13.2.3,1.13.2.4

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Thu, 03 Apr 2003 18:46:41 -0800


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

Modified Files:
      Tag: release22-maint
	Header.py 
Log Message:
Backporting:

    revision 1.27
    date: 2003/03/30 20:46:47;  author: bwarsaw;  state: Exp;  lines: +3 -3
    __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.13.2.3
retrieving revision 1.13.2.4
diff -C2 -d -r1.13.2.3 -r1.13.2.4
*** Header.py	21 Mar 2003 21:09:31 -0000	1.13.2.3
--- Header.py	4 Apr 2003 02:46:38 -0000	1.13.2.4
***************
*** 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