[PATCH] ftp transport, dsilver's branch
Matthieu Moy
Matthieu.Moy at imag.fr
Sat Jan 28 18:14:03 GMT 2006
Hi,
First, a reminder: Daniel Silverstone's ftp branch contains some fixes
that have not been merged. In particular, it allows reusing
connections instead of creating several ones in parallel[1].
The branch can be found here:
http://bzr.digital-scurf.org/trees/dsilvers/bzr.dev/
Now, a problem: this branch does not parse :-(. The following (naive)
patch solves the problem for me.
=== modified file 'bzrlib/transport/ftp.py'
--- bzrlib/transport/ftp.py
+++ bzrlib/transport/ftp.py
@@ -190,7 +190,7 @@
ret.seek(0)
return ret
except ftplib.error_perm, e:
- raise NoSuchFile(self.abspath(relpath), extra=extra)
+ raise NoSuchFile(self.abspath(relpath))
def put(self, relpath, fp, mode=None):
"""Copy the file-like or string object into the location.
@@ -208,9 +208,8 @@
f.storbinary('STOR '+self._abspath(relpath), fp, 8192)
except ftplib.error_perm, e:
if "no such file" in str(e).lower():
- raise NoSuchFile(msg="Error storing %s: %s"
- % (self.abspath(relpath), str(e)),
- orig_error=e)
+ raise NoSuchFile("Error storing %s: %s"
+ % (self.abspath(relpath), str(e)))
else:
raise FtpTransportError(orig_error=e)
It would be nice if Daniel's changes could be merged into mainline
with this patch (or a better one).
Thanks,
--
Matthieu
[1] Since my ISP has a limit to 2 simultaneous connections per users,
this is a must-have for me.
More information about the bazaar
mailing list