diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-09-20 17:44:53 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-09-20 17:44:53 -0400 |
commit | 97dfad7856df5d9c681fa74d576a23247cc55a33 (patch) | |
tree | 6cf1185cd268ea1d5937bb0f415c21ac002012bf /Lib/email/message.py | |
parent | 9833fcbca3317bb664252437a3c58d68bfee13a8 (diff) | |
download | cpython-git-97dfad7856df5d9c681fa74d576a23247cc55a33.tar.gz |
#21079: is_attachment now looks only at the value, ignoring parameters.
Diffstat (limited to 'Lib/email/message.py')
-rw-r--r-- | Lib/email/message.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py index aa46debeba..124071d5e1 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py @@ -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: |