paramiko 1.6.4 breaks if auth sock doesn't exist

Robey Pointer robey at lag.net
Tue Dec 26 01:37:21 GMT 2006


On 20 Nov 2006, at 19:39, Martin Pool wrote:

> On one machine, for some mysterious reason, I have SSH_AUTH_SOCK
> pointing to a socket that doesn't exist.  That gives me this  
> traceback:
>
>   File "/Users/mbp/bzr/Work/keepalive/bzrlib/transport/smart.py",  
> line 1632, in _accept_bytes
>     self._ensure_connection()
>   File "/Users/mbp/bzr/Work/keepalive/bzrlib/transport/smart.py",  
> line 1655, in _ensure_connection
>     command=[executable, 'serve', '--inet', '--directory=/',
>   File "/Users/mbp/bzr/Work/keepalive/bzrlib/transport/ssh.py",  
> line 255, in connect_ssh
>     t = self._connect(username, password, host, port)
>   File "/Users/mbp/bzr/Work/keepalive/bzrlib/transport/ssh.py",  
> line 243, in _connect
>     _paramiko_auth(username, password, host, t)
>   File "/Users/mbp/bzr/Work/keepalive/bzrlib/transport/ssh.py",  
> line 382, in _paramiko_auth
>     agent = paramiko.Agent()
>   File "/Users/mbp/lib/python/paramiko/agent.py", line 61, in __init__
>     conn.connect(os.environ['SSH_AUTH_SOCK'])
>   File "<string>", line 1, in connect
> error: (2, 'No such file or directory')
>
> I suggest you should probably catch this (or all connection errors?),
> and treat them as just not having an agent.

Good point, and done.

robey
(See, like a turtle, I may be slow, but I get to all the email  
eventually...) :)





More information about the bazaar mailing list