Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8af56778
Commit
8af56778
authored
Mar 26, 2003
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typed_subpart_iterator(): Fix these to use non-deprecated APIs,
i.e. get_content_maintype() and get_content_subtype().
parent
11cfbd6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/email/_compat21.py
Lib/email/_compat21.py
+2
-2
No files found.
Lib/email/_compat21.py
View file @
8af56778
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment