sftp query

Robey Pointer robey at lag.net
Wed Nov 30 22:19:30 GMT 2005


On 29 Nov 2005, at 21:58, James Mills wrote:

> Hi,
>
> I'm trying to make use of bzr and it's sftp transport:
>
> ~/var/cwd/local/websites
> $ bzr branch sftp://eta@dede.mills//home/eta/www
> explosivestraining.com.au
> SSH eta at dede.mills password:
> bzr: ERROR: Socket exception: Resource temporarily unavailable (11)
> bzr: ERROR:
>   command: '/usr/bin/bzr' 'branch' 'sftp://eta@dede.mills//home/eta/ 
> www'
> 'explosivestraining.com.au'
>       pwd: u'/home/prologic/var/cwd/local/websites'
>     error: exceptions.EOFError
>   at /usr/lib/python2.4/site-packages/paramiko/sftp.py line 139, in
> _write_all()
>   see ~/.bzr.log for debug information
>
> What am I doing wrong ? :)

I think this is because the SFTP module doesn't catch that EAGAIN  
exception when talking across a pipe to openssh.

If you can dig out the actual exception name (from .bzr.log) I can  
add a patch to paramiko's SFTP module to catch that and do something  
like wait 0.1 seconds before trying again.

... I feel like I've run into this problem before (blocking sockets  
returning EAGAIN), but only on OSX.  It looks like I sidestepped it  
inside paramiko by using select().  I'm pretty sure you can't select 
() on a pipe on Windows, though, so that's out.

robey





More information about the bazaar mailing list