From 55dea419596028db42bbc18b9afe35b1000dfe4b Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 28 Apr 2016 12:09:45 +0300 Subject: [PATCH] gpg: make sure gpg-agent is running before connecting --- trezor_agent/gpg/agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trezor_agent/gpg/agent.py b/trezor_agent/gpg/agent.py index a749a55..34a5dcf 100644 --- a/trezor_agent/gpg/agent.py +++ b/trezor_agent/gpg/agent.py @@ -18,6 +18,7 @@ log = logging.getLogger(__name__) def connect(sock_path='~/.gnupg/S.gpg-agent'): """Connect to GPG agent's UNIX socket.""" sock_path = os.path.expanduser(sock_path) + sp.check_call(['gpg-connect-agent', '/bye']) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.connect(sock_path) return sock