summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-09-20 21:49:48 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-09-20 21:49:48 (GMT)
commit1de0ac05f3467faad2e0a0d6d08f86c06bf43b1b (patch)
tree158dacfd556f2eb920ef34ffc3623e337b32abcf /Lib/email
parente22735036bd749dea3eba340cb077b82d7b35b86 (diff)
parent97dfad7856df5d9c681fa74d576a23247cc55a33 (diff)
downloadcpython-1de0ac05f3467faad2e0a0d6d08f86c06bf43b1b.zip
cpython-1de0ac05f3467faad2e0a0d6d08f86c06bf43b1b.tar.gz
cpython-1de0ac05f3467faad2e0a0d6d08f86c06bf43b1b.tar.bz2
Merge: #21079: is_attachment now looks only at the value, ignoring parameters.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/message.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py
index aa46deb..124071d 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: