diff options
Diffstat (limited to 'alot/crypto.py')
-rw-r--r-- | alot/crypto.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/alot/crypto.py b/alot/crypto.py index 08213f34..b0849ae2 100644 --- a/alot/crypto.py +++ b/alot/crypto.py @@ -202,10 +202,11 @@ def verify_detached(message, signature): message_data = StringIO(message) signature_data = StringIO(signature) ctx = gpgme.Context() - try: - return ctx.verify(signature_data, message_data, None) - except gpgme.GpgmeError as e: - raise GPGProblem(e.message, code=e.code) + + status = ctx.verify(signature_data, message_data, None) + if isinstance(status[0].status, gpgme.GpgmeError): + raise GPGProblem(status[0].status.message, code=status[0].status.code) + return status def decrypt_verify(encrypted): |