From 8af56778fd7753252861baab3fa00ac3696ddbc6 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 26 Mar 2003 17:56:21 +0000 Subject: typed_subpart_iterator(): Fix these to use non-deprecated APIs, i.e. get_content_maintype() and get_content_subtype(). --- Lib/email/_compat21.py | 4 ++-- 1 file 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 -- cgit v0.12