From 9f0ac2239af18f780c757f8cf6524c99de2dffe8 Mon Sep 17 00:00:00 2001 From: J08nY Date: Fri, 14 Jul 2017 15:13:47 +0200 Subject: More tests for key command. --- src/mailman_pgp/commands/eml_key.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mailman_pgp/commands/eml_key.py') 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) -- cgit v1.2.3-70-g09d2