[Python-checkins] python/dist/src/Lib/email Charset.py,1.4,1.5 Message.py,1.18,1.19 Parser.py,1.12,1.13

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Fri, 23 Aug 2002 11:19:32 -0700


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

Modified Files:
	Charset.py Message.py Parser.py 
Log Message:
Whitespace normalization.


Index: Charset.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Charset.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Charset.py	1 Jun 2002 03:56:07 -0000	1.4
--- Charset.py	23 Aug 2002 18:19:30 -0000	1.5
***************
*** 12,16 ****
      def _is_unicode(x):
          return isinstance(x, UnicodeType)
!     
  from email.Encoders import encode_7or8bit
  import email.base64MIME
--- 12,16 ----
      def _is_unicode(x):
          return isinstance(x, UnicodeType)
! 
  from email.Encoders import encode_7or8bit
  import email.base64MIME

Index: Message.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Message.py	20 Aug 2002 14:50:09 -0000	1.18
--- Message.py	23 Aug 2002 18:19:30 -0000	1.19
***************
*** 53,62 ****
  def _unquotevalue(value):
      if isinstance(value, TupleType):
!        return (value[0], value[1], Utils.unquote(value[2]))
      else:
!        return Utils.unquote(value)
  
  
! 
  class Message:
      """Basic message object for use inside the object tree.
--- 53,62 ----
  def _unquotevalue(value):
      if isinstance(value, TupleType):
!         return (value[0], value[1], Utils.unquote(value[2]))
      else:
!         return Utils.unquote(value)
  
  
!  
  class Message:
      """Basic message object for use inside the object tree.

Index: Parser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Parser.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Parser.py	19 Jul 2002 22:25:34 -0000	1.12
--- Parser.py	23 Aug 2002 18:19:30 -0000	1.13
***************
*** 130,134 ****
              separator = '--' + boundary
              payload = fp.read()
!             # We use an RE here because boundaries can have trailing 
              # whitespace.
              mo = re.search(
--- 130,134 ----
              separator = '--' + boundary
              payload = fp.read()
!             # We use an RE here because boundaries can have trailing
              # whitespace.
              mo = re.search(
***************
*** 177,183 ****
              # We split the textual payload on the boundary separator, which
              # includes the trailing newline. If the container is a
!             # multipart/digest then the subparts are by default message/rfc822 
!             # instead of text/plain.  In that case, they'll have a optional 
!             # block of MIME headers, then an empty line followed by the 
              # message headers.
              parts = re.split(
--- 177,183 ----
              # We split the textual payload on the boundary separator, which
              # includes the trailing newline. If the container is a
!             # multipart/digest then the subparts are by default message/rfc822
!             # instead of text/plain.  In that case, they'll have a optional
!             # block of MIME headers, then an empty line followed by the
              # message headers.
              parts = re.split(
***************
*** 185,189 ****
                  payload[start:terminator])
              for part in parts:
!                 if isdigest: 
                      if part[0] == linesep:
                          # There's no header block so create an empty message
--- 185,189 ----
                  payload[start:terminator])
              for part in parts:
!                 if isdigest:
                      if part[0] == linesep:
                          # There's no header block so create an empty message