summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-16 14:27:52 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-16 14:27:52 +0100
commitf49f3ac53299a1e567f982a2fea3dec2b4f63acb (patch)
tree5e7e294140ae93536954bc5bf8ccac4407353bb6
parentc33fcbc77fd2d94b9757796deaf758b253d591c6 (diff)
downloadgemato-f49f3ac53299a1e567f982a2fea3dec2b4f63acb.tar.gz
openpgp: Do not call gpgconf, more trouble than benefit
It turns out that 'gpgconf --kill' is not supported by gpg-2.0. Given that removing the homedir will cause the agent to quit, and that we need to explicitly handle race conditions between the cleanup and agent quitting anyway, let's just go straight for removal.
-rw-r--r--gemato/openpgp.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py
index 13f8c3f..b76232f 100644
--- a/gemato/openpgp.py
+++ b/gemato/openpgp.py
@@ -147,16 +147,6 @@ disable-scdaemon
def close(self):
if self._home is not None:
- if self._impl is not None:
- try:
- # terminate the agent spawned by the process
- subprocess.Popen(['gpgconf', '--kill', 'all'],
- env={'GNUPGHOME': self._home}).wait()
- except OSError as e:
- # ignore ENOENT -- most likely it means gpg1 which
- # had no gpg-agent
- if e.errno != errno.ENOENT:
- raise
shutil.rmtree(self._home, onerror=self._rmtree_error_handler)
self._home = None