summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemato/openpgp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py
index 951ab79..9078b59 100644
--- a/gemato/openpgp.py
+++ b/gemato/openpgp.py
@@ -55,6 +55,9 @@ class OpenPGPEnvironment(object):
def close(self):
if self._home is not None:
+ # terminate the agent spawned by the process
+ subprocess.Popen(['gpgconf', '--kill', 'all'],
+ env={'GNUPGHOME': self._home}).wait()
shutil.rmtree(self._home)
self._home = None