[openpgp] Add delete key method when using gpgme

This commit is contained in:
lovetox
2022-04-12 21:52:43 +02:00
parent 8983ec9598
commit 713cea57a6

View File

@@ -181,3 +181,8 @@ class GPGME:
key = self.get_key(fingerprint)
return KeyringItem(key)
def delete_key(self, fingerprint):
key = self.get_key(fingerprint)
with gpg.Context(**self._context_args) as context:
context.op_delete(key, True)