[Python-checkins] python/dist/src/Lib/email _compat21.py,1.4.2.2,1.4.2.3
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Thu, 03 Apr 2003 18:47:56 -0800
Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv1057
Modified Files:
Tag: release22-maint
_compat21.py
Log Message:
Backporting:
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.4.2.2
retrieving revision 1.4.2.3
diff -C2 -d -r1.4.2.2 -r1.4.2.3
*** _compat21.py 21 Mar 2003 21:09:31 -0000 1.4.2.2
--- _compat21.py 4 Apr 2003 02:47:54 -0000 1.4.2.3
***************
*** 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