Broken pipe FTP error
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 1 17:08:33 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Laszlo Pandy wrote:
> FTP control connection closed. Trying to reopen.
> bzr: ERROR: socket.error: (32, 'Broken pipe')
>
Seems like we just need to catch this error and re-raise it as a
bzrlib.errors.SocketConnectionError.
Probably something like (against bzr.dev)
=== modified file 'bzrlib/transport/ftp.py'
- --- bzrlib/transport/ftp.py 2007-07-20 18:59:29 +0000
+++ bzrlib/transport/ftp.py 2007-08-01 16:08:15 +0000
@@ -33,6 +33,7 @@
import urllib
import urlparse
import select
+import socket
import stat
import threading
import time
@@ -249,7 +250,7 @@
warning("FTP temporary error: %s. Retrying.", str(e))
self._reconnect()
return self.get(relpath, decode, retries+1)
- - except EOFError, e:
+ except (socket.error, EOFError), e:
if retries > _number_of_retries:
raise errors.TransportError("FTP control connection closed
during GET %s."
% self.abspath(relpath),
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGsLABJdeBCYSNAAMRAj+nAKCtcjojPJ1gw6BIfTxPIq2gMFoR9QCglUib
2/cEHusD2n2QwHOfy2EDD3s=
=IGu3
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list