aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/commands/eml_key.py
diff options
context:
space:
mode:
authorJ08nY2017-07-14 15:13:47 +0200
committerJ08nY2017-07-14 15:13:47 +0200
commit9f0ac2239af18f780c757f8cf6524c99de2dffe8 (patch)
treef1b7d906ce1ebabbdbd63f93a3a7a7702ae00abc /src/mailman_pgp/commands/eml_key.py
parent0b9335e163791959390bf3c83928e5b61e912fa3 (diff)
downloadmailman-pgp-9f0ac2239af18f780c757f8cf6524c99de2dffe8.tar.gz
mailman-pgp-9f0ac2239af18f780c757f8cf6524c99de2dffe8.tar.zst
mailman-pgp-9f0ac2239af18f780c757f8cf6524c99de2dffe8.zip
Diffstat (limited to 'src/mailman_pgp/commands/eml_key.py')
-rw-r--r--src/mailman_pgp/commands/eml_key.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mailman_pgp/commands/eml_key.py b/src/mailman_pgp/commands/eml_key.py
index 2f7a7e7..1b6dc9f 100644
--- a/src/mailman_pgp/commands/eml_key.py
+++ b/src/mailman_pgp/commands/eml_key.py
@@ -109,6 +109,10 @@ def _cmd_confirm(pgp_list, mlist, msg, msgdata, arguments, results):
print('A pgp enabled address not found.', file=results)
return ContinueProcessing.no
+ if pgp_address.key is None:
+ print('No key set.', file=results)
+ return ContinueProcessing.no
+
wrapped = PGPWrapper(msg)
if wrapped.is_encrypted():
decrypted = wrapped.decrypt(pgp_list.key)