[Python-checkins] CVS: python/dist/src/Lib/email Iterators.py,1.4,1.5

Barry Warsaw bwarsaw@users.sourceforge.net
2001年10月14日 21:38:24 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv32444/Lib/email
Modified Files:
	Iterators.py 
Log Message:
typed_subpart_iterator(): When getting the main type use 'text' as the
failobj, and when getting the subtype use 'plain' as the failobj.
text/plain is supposed to be the default if the message contains no
Content-Type: header.
Index: Iterators.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Iterators.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Iterators.py	2001年10月04日 17:05:11	1.4
--- Iterators.py	2001年10月15日 04:38:22	1.5
***************
*** 29,33 ****
 """
 for subpart in msg.walk():
! if subpart.get_main_type() == maintype:
! if subtype is None or subpart.get_subtype() == subtype:
 yield subpart
--- 29,33 ----
 """
 for subpart in msg.walk():
! if subpart.get_main_type('text') == maintype:
! if subtype is None or subpart.get_subtype('plain') == subtype:
 yield subpart

AltStyle によって変換されたページ (->オリジナル) /