[entropy.security] Security.get_pubkey() catch GPGError in case of issues exporting pubkey, and raise KeyError

This commit is contained in:
Fabio Erculiani
2010-12-09 21:38:42 +01:00
parent 689f5dd95e
commit af39de27a6

View File

@@ -1828,7 +1828,10 @@ class Repository:
"""
keymap = self.__get_keymap()
fingerprint = keymap[repository_identifier]
pubkey = self.__export_key(fingerprint)
try:
pubkey = self.__export_key(fingerprint)
except GPGError as err:
raise KeyError(repr(err))
return pubkey
def get_privkey(self, repository_identifier):