mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#21079: is_attachment now looks only at the value, ignoring parameters.
This commit is contained in:
parent
9833fcbca3
commit
97dfad7856
3 changed files with 6 additions and 4 deletions
|
@ -941,9 +941,7 @@ class MIMEPart(Message):
|
|||
@property
|
||||
def is_attachment(self):
|
||||
c_d = self.get('content-disposition')
|
||||
if c_d is None:
|
||||
return False
|
||||
return c_d.lower() == 'attachment'
|
||||
return False if c_d is None else c_d.content_disposition == 'attachment'
|
||||
|
||||
def _find_body(self, part, preferencelist):
|
||||
if part.is_attachment:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue