summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-26 17:56:21 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-26 17:56:21 (GMT)
commit8af56778fd7753252861baab3fa00ac3696ddbc6 (patch)
tree063784b18a427099e7fdf6fd31e23fb04f9c064c
parent11cfbd6ef2496aa08437fe6aab6a2768636206fd (diff)
downloadcpython-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().
-rw-r--r--Lib/email/_compat21.py4
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