Paramiko throws EOFError rather than returning a 0 length file or ENOENT

Robert Collins robertc at robertcollins.net
Sun Sep 10 22:31:19 BST 2006


On Wed, 2006-08-23 at 17:10 +0200, Tollef Fog Heen wrote:
> My network was slow today and I got this not-so-nice traceback whe
> doing bzr push:
> 
> : tfheen at thosu ..sper/trunk/ubiquity-hooks > bzr push
> Using saved location: sftp://bazaar.launchpad.net/~ubuntu-core-dev/casper/trunk
> Disconnecting: Timeout, server not responding.
> bzr: ERROR: exceptions.EOFError:
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 697, in run_bzr_catch_errors
>     return run_bzr(argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 659, in run_bzr
>     ret = run(*run_argv)
>   File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 281, in run_argv_aliases
>     return self.run(**all_cmd_args)
>   File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 547, in run
>     dir_to = bzrdir.BzrDir.open(location_url)
>   File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 464, in open
>     format = BzrDirFormat.find_format(t)
>   File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 962, in find_format
>     return format.probe_transport(transport)
>   File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 972, in probe_transport
>     format_string = transport.get(".bzr/branch-format").read()
>   File "/usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py", line 438, in get
>     f = self._sftp.file(path, mode='rb')
>   File "/usr/lib/python2.4/site-packages/paramiko/sftp_client.py", line 204, in file
>     t, msg = self._request(CMD_OPEN, filename, imode, attrblock)
>   File "/usr/lib/python2.4/site-packages/paramiko/sftp_client.py", line 526, in _request
>     return self._read_response(num)
>   File "/usr/lib/python2.4/site-packages/paramiko/sftp_client.py", line 555, in _read_response
>     t, data = self._read_packet()
>   File "/usr/lib/python2.4/site-packages/paramiko/sftp.py", line 162, in _read_packet
>     size = struct.unpack('>I', self._read_all(4))[0]
>   File "/usr/lib/python2.4/site-packages/paramiko/sftp.py", line 150, in _read_all
>     raise EOFError()
> EOFError
> 
> bzr 0.9.0 on python 2.4.4.candidate.0 (linux2)
> arguments: ['/usr/bin/bzr', 'push']
> 
> ** please send this report to bazaar-ng at lists.ubuntu.com
> 
> bzr is 0.9-0ubuntu2, the rest of the system is up-to-date edgy.

Looks to me like paramiko is being unfriendly here. We should probably
catch this and turn it into either ENOENT or a 0 length file, depending
on what Robey says is happening.

 affects /products/bzr

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060911/acf71562/attachment.pgp 


More information about the bazaar mailing list