summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/Iterators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/Iterators.py b/Lib/email/Iterators.py
index d1ee53f..a64495d 100644
--- a/Lib/email/Iterators.py
+++ b/Lib/email/Iterators.py
@@ -28,6 +28,6 @@ def typed_subpart_iterator(msg, maintype='text', subtype=None):
omitted, only the main type is matched.
"""
for subpart in msg.walk():
- if subpart.get_main_type() == maintype:
- if subtype is None or subpart.get_subtype() == subtype:
+ if subpart.get_main_type('text') == maintype:
+ if subtype is None or subpart.get_subtype('plain') == subtype:
yield subpart