[Python-checkins] python/dist/src/Lib/email _compat21.py,1.7,1.8

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Wed, 26 Mar 2003 09:56:25 -0800


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

Modified Files:
	_compat21.py 
Log Message:
typed_subpart_iterator(): Fix these to use non-deprecated APIs,
i.e. get_content_maintype() and get_content_subtype().


Index: _compat21.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/_compat21.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** _compat21.py	12 Mar 2003 02:54:17 -0000	1.7
--- _compat21.py	26 Mar 2003 17:56:21 -0000	1.8
***************
*** 64,69 ****
      parts = []
      for subpart in msg.walk():
!         if subpart.get_main_type('text') == maintype:
!             if subtype is None or subpart.get_subtype('plain') == subtype:
                  parts.append(subpart)
      return parts
--- 64,69 ----
      parts = []
      for subpart in msg.walk():
!         if subpart.get_content_maintype() == maintype:
!             if subtype is None or subpart.get_content_subtype() == subtype:
                  parts.append(subpart)
      return parts