summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/buffers.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/alot/buffers.py b/alot/buffers.py
index 6641bd2e..db122aef 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -167,15 +167,11 @@ class EnvelopeBuffer(Buffer):
description += ', with key '
elif len(encrypt_keys) > 1:
description += ', with keys '
- first_key = True
+ key_ids = []
for key in encrypt_keys:
- if key is not None:
- if first_key:
- first_key = False
- else:
- description += ', '
- if len(key.subkeys) > 0:
- description += key.uids[0].uid
+ if key is not None and key.subkeys:
+ key_ids.append(key.uids[0].uid)
+ description += ', '.join(key_ids)
lines.append(('GPG encrypt', description))
if self.envelope.tags: