From 7c6a87acaead5f54e1f2155ecf0a089eff97d654 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 13 May 2013 23:06:35 +0900 Subject: use temporary openpgpwrapper as a context manager in this way we implicitely catch any exception during the wrapped call, and ensure that the destructor is always called. --- src/leap/common/keymanager/errors.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/leap/common/keymanager/errors.py') diff --git a/src/leap/common/keymanager/errors.py b/src/leap/common/keymanager/errors.py index d6802f0..89949d2 100644 --- a/src/leap/common/keymanager/errors.py +++ b/src/leap/common/keymanager/errors.py @@ -72,6 +72,13 @@ class DecryptionFailed(Exception): pass +class EncryptionDecryptionFailed(Exception): + """ + Raised upon failures of encryption/decryption. + """ + pass + + class SignFailed(Exception): """ Raised when failed to sign. -- cgit v1.2.3