From 97dfad7856df5d9c681fa74d576a23247cc55a33 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Sat, 20 Sep 2014 17:44:53 -0400 Subject: #21079: is_attachment now looks only at the value, ignoring parameters. --- Lib/email/message.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Lib/email/message.py') 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: -- cgit v1.2.1