diff options
author | Barry Warsaw <barry@python.org> | 2003-03-26 17:56:21 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-26 17:56:21 (GMT) |
commit | 8af56778fd7753252861baab3fa00ac3696ddbc6 (patch) | |
tree | 063784b18a427099e7fdf6fd31e23fb04f9c064c /Lib | |
parent | 11cfbd6ef2496aa08437fe6aab6a2768636206fd (diff) | |
download | cpython-8af56778fd7753252861baab3fa00ac3696ddbc6.zip cpython-8af56778fd7753252861baab3fa00ac3696ddbc6.tar.gz cpython-8af56778fd7753252861baab3fa00ac3696ddbc6.tar.bz2 |
typed_subpart_iterator(): Fix these to use non-deprecated APIs,
i.e. get_content_maintype() and get_content_subtype().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/email/_compat21.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/_compat21.py b/Lib/email/_compat21.py index 0e0b3d0..1e1f666 100644 --- a/Lib/email/_compat21.py +++ b/Lib/email/_compat21.py @@ -63,7 +63,7 @@ def typed_subpart_iterator(msg, maintype='text', subtype=None): """ parts = [] for subpart in msg.walk(): - if subpart.get_main_type('text') == maintype: - if subtype is None or subpart.get_subtype('plain') == subtype: + if subpart.get_content_maintype() == maintype: + if subtype is None or subpart.get_content_subtype() == subtype: parts.append(subpart) return parts |