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
3a93dc3a
Commit
3a93dc3a
authored
Oct 09, 2001
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_all(): We never returned failobj if we found no matching headers.
Fix that, and also make the docstring describe failobj.
parent
01a004db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Lib/email/Message.py
Lib/email/Message.py
+4
-0
No files found.
Lib/email/Message.py
View file @
3a93dc3a
...
...
@@ -227,12 +227,16 @@ class Message:
These
will
be
sorted
in
the
order
they
appeared
in
the
original
message
,
and
may
contain
duplicates
.
Any
fields
deleted
and
re
-
inserted
are
alwyas
appended
to
the
header
list
.
If
no
such
fields
exist
,
failobj
is
returned
(
defaults
to
None
).
"""
values = []
name = name.lower()
for k, v in self._headers:
if k.lower() == name:
values.append(v)
if not values:
return failobj
return values
def add_header(self, _name, _value, **_params):
...
...
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