gpg: no need to remove the UNIX socket

Our agent should be invoked and re-used when running 'gpg --import'.
nistp521
Roman Zeyde 7 years ago
parent cb3477fc69
commit 1f9d457e92
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

@ -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)

Loading…
Cancel
Save