From 1f9d457e9249c98733277633c04d634b7493a80f Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 16 Nov 2017 21:53:38 +0200 Subject: [PATCH] gpg: no need to remove the UNIX socket Our agent should be invoked and re-used when running 'gpg --import'. --- libagent/gpg/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libagent/gpg/__init__.py b/libagent/gpg/__init__.py index 725ca39..58641d1 100644 --- a/libagent/gpg/__init__.py +++ b/libagent/gpg/__init__.py @@ -176,8 +176,6 @@ fi gpg_binary = keyring.get_gnupg_binary() check_call([gpg_binary, '--homedir', homedir, '--quiet', '--import', pubkey.name]) - check_call(['rm', '-f', os.path.join(homedir, 'S.gpg-agent')]) - # (otherwise, our agent won't be started automatically) # Make new GPG identity with "ultimate" trust (via its fingerprint) out = check_output([gpg_binary, '--homedir', homedir, '--list-public-keys', @@ -215,6 +213,7 @@ def run_agent(device_type): filename=config['log-file']) log.debug('sys.argv: %s', sys.argv) log.debug('os.environ: %s', os.environ) + log.debug('pid: %d, parent pid: %d', os.getpid(), os.getppid()) try: env = {'GNUPGHOME': args.homedir} sock_path = keyring.get_agent_sock_path(env=env)