summaryrefslogtreecommitdiff
path: root/keymanager/src/leap/keymanager/openpgp.py
diff options
context:
space:
mode:
Diffstat (limited to 'keymanager/src/leap/keymanager/openpgp.py')
-rw-r--r--keymanager/src/leap/keymanager/openpgp.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/keymanager/src/leap/keymanager/openpgp.py b/keymanager/src/leap/keymanager/openpgp.py
index 78acd6a..f6223d5 100644
--- a/keymanager/src/leap/keymanager/openpgp.py
+++ b/keymanager/src/leap/keymanager/openpgp.py
@@ -424,10 +424,14 @@ class OpenPGPScheme(EncryptionScheme):
"""
Remove C{key} from storage.
+ May raise:
+ errors.KeyNotFound
+ errors.KeyAttributesDiffer
+
:param key: The key to be removed.
:type key: EncryptionKey
"""
- leap_assert(key.__class__ is OpenPGPKey, 'Wrong key type.')
+ leap_assert_type(key, OpenPGPKey)
stored_key = self.get_key(key.address, private=key.private)
if stored_key is None:
raise errors.KeyNotFound(key)