summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/db/message.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/alot/db/message.py b/alot/db/message.py
index ae06acc6..b9a474d7 100644
--- a/alot/db/message.py
+++ b/alot/db/message.py
@@ -252,10 +252,13 @@ class Message(object):
if ct in ['octet/stream', 'application/octet-stream']:
content = part.get_payload(decode=True)
ct = helper.guess_mimetype(content)
+ if (self._attachments and
+ self._attachments[-1].get_content_type() ==
+ 'application/pgp-encrypted'):
+ self._attachments.pop()
if cd.lower().startswith('attachment'):
- if ct.lower() not in ['application/pgp-encrypted',
- 'application/pgp-signature']:
+ if ct.lower() not in ['application/pgp-signature']:
self._attachments.append(Attachment(part))
elif cd.lower().startswith('inline'):
if (filename is not None and