[Python-checkins] python/dist/src/Lib/email Parser.py,1.20.4.1,1.20.4.2
anthonybaxter@users.sourceforge.net
anthonybaxter@users.sourceforge.net
Wed, 11 Jun 2003 23:39:11 -0700
Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv27097
Modified Files:
Tag: anthony-parser-branch
Parser.py
Log Message:
message/delivery-status fixed.
HeaderParser fixed.
Index: Parser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Parser.py,v
retrieving revision 1.20.4.1
retrieving revision 1.20.4.2
diff -C2 -d -r1.20.4.1 -r1.20.4.2
*** Parser.py 12 Jun 2003 06:08:56 -0000 1.20.4.1
--- Parser.py 12 Jun 2003 06:39:09 -0000 1.20.4.2
***************
*** 135,139 ****
obj = self._parsemessage(root, fp)
trailer = fp.read()
! self._attach_trailer(obj, trailer)
return root
--- 135,140 ----
obj = self._parsemessage(root, fp)
trailer = fp.read()
! if obj and trailer:
! self._attach_trailer(obj, trailer)
return root
***************
*** 221,225 ****
isdigest = (container.get_content_type() == 'multipart/digest')
if boundary:
- preamble = epilogue = None
separator = '--' + boundary
boundaryRE = re.compile(
--- 222,225 ----
***************
*** 228,232 ****
preamble, matchobj = fp.readuntil(boundaryRE)
if not matchobj:
! # Broken. Just set the body to the text
container.set_payload(preamble)
return container
--- 228,233 ----
preamble, matchobj = fp.readuntil(boundaryRE)
if not matchobj:
! # Broken - we hit the end of file. Just set the body
! # to the text.
container.set_payload(preamble)
return container
***************
*** 297,301 ****
if nextline[:2] == "--":
break
! return container
else:
raise ValueError, "%s not implemented yet"%(ct)
--- 298,302 ----
if nextline[:2] == "--":
break
! return container
else:
raise ValueError, "%s not implemented yet"%(ct)
***************
*** 325,326 ****
--- 326,328 ----
text = fp.read()
container.set_payload(text)
+ return None