Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-04-12 22:52:43 +0300
committerlovetox <philipp@hoerist.com>2022-04-12 22:52:43 +0300
commit713cea57a668508cb66d875d29db4ac7d82ee6fc (patch)
tree4914013e35bb4610ac36909afb2675f453318a7e /openpgp
parent8983ec95983610f5a27f851299aad9b180ae62a1 (diff)
[openpgp] Add delete key method when using gpgme
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/backend/gpgme.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/backend/gpgme.py b/openpgp/backend/gpgme.py
index 9b22d4d..6a108eb 100644
--- a/openpgp/backend/gpgme.py
+++ b/openpgp/backend/gpgme.py
@@ -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)