[MERGE] Fix strange default paramater to _sftp_readv
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 15 15:03:00 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Martin Pool wrote:
> I saw this a while ago while debugging something else. As far as I can see it
> isn't used by the called class, and a value is always given.
> - def _sftp_readv(self, fp, offsets, relpath='<unknown>'):
> + def _sftp_readv(self, fp, offsets, relpath):
> """Use the readv() member of fp to do async readv.
> - And then read them using paramiko.readv(). paramiko.readv()
> + Then read them using paramiko.readv(). paramiko.readv()
> does not support ranges > 64K, so it caps the request size, and
> - just reads until it gets all the stuff it wants
> + just reads until it gets all the stuff it wants.
> helper = _SFTPReadvHelper(offsets, relpath)
> return helper.request_and_yield_offsets(fp)
If this still passes the test suite, then I think it is fine.
The "relpath" is only used as part of the error handling. So it could
raise something to indicate to the user what object was failing. I don't
remember what case I was working on where there wasn't an easily
available relpath to be supplied. But if that case is gone now, then I'm
fine changing it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar