diff options
author | Kali Kaneko <kali@leap.se> | 2013-05-13 23:06:35 +0900 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-05-21 01:57:26 +0900 |
commit | 7c6a87acaead5f54e1f2155ecf0a089eff97d654 (patch) | |
tree | 57faff0c4f476557c3e457514f5aed99abfbc3de /src/leap/common/keymanager/errors.py | |
parent | 2a78ab3c730ba652153deaed55cfa8d92089a979 (diff) |
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.
Diffstat (limited to 'src/leap/common/keymanager/errors.py')
-rw-r--r-- | src/leap/common/keymanager/errors.py | 7 |
1 files changed, 7 insertions, 0 deletions
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. |