diff options
Diffstat (limited to 'sshagent.py')
-rw-r--r-- | sshagent.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sshagent.py b/sshagent.py index 8c310f4..6803b89 100644 --- a/sshagent.py +++ b/sshagent.py | |||
@@ -20,11 +20,13 @@ class SSHAgent(object): | |||
20 | SSH Agent communication protocol for signing only. | 20 | SSH Agent communication protocol for signing only. |
21 | """ | 21 | """ |
22 | 22 | ||
23 | AGENT_SOCK_NAME = 'SSH_AUTH_SOCK' | ||
24 | |||
23 | SSH2_AGENT_SIGN_RESPONSE = 14 | 25 | SSH2_AGENT_SIGN_RESPONSE = 14 |
24 | SSH2_AGENTC_SIGN_REQUEST = 13 | 26 | SSH2_AGENTC_SIGN_REQUEST = 13 |
25 | 27 | ||
26 | def __init__(self, socket_path=None): | 28 | def __init__(self, socket_path=None): |
27 | default_path = os.environ.get('SSH_AUTH_SOCK') | 29 | default_path = os.environ.get(SSHAgent.AGENT_SOCK_NAME) |
28 | socket_path = default_path if not socket_path else socket_path | 30 | socket_path = default_path if not socket_path else socket_path |
29 | 31 | ||
30 | if not socket_path: | 32 | if not socket_path: |