gpg: add comment for stopping current gpg-agent

This commit is contained in:
Roman Zeyde
2016-10-16 22:40:16 +03:00
parent 6f8d0df116
commit 7de88a3980

View File

@@ -24,7 +24,7 @@ def get_agent_sock_path(sp=subprocess):
def connect_to_agent(sp=subprocess):
"""Connect to GPG agent's UNIX socket."""
sock_path = get_agent_sock_path(sp=sp)
sp.check_call(['gpg-connect-agent', '/bye'])
sp.check_call(['gpg-connect-agent', '/bye']) # Stop current gpg-agent
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(sock_path)
return sock