[PATCH] Re: any more sftp fixes?
James Henstridge
james at jamesh.id.au
Thu Dec 1 01:53:19 GMT 2005
Matthieu Moy wrote:
>Moreover, in relpath(self, abspath) too, abspath does not necessarily
>contain a port number, so _split_url might return None for the port.
>The patch also fixes this by setting the port to 22 in _split_url()
>instead of _parse_url(). That seems to be sufficient for me.
>
>
The existing behaviour where self._port is None if no port was set in
the URL is intentional. The _paramiko_connect() method should then
treat a port number of None as 22. The current bzr.dev tree handles
this okay:
t = paramiko.Transport((self._host, self._port or 22))
In the non-paramiko case, if the port is None then no port is specified
on the ssh command line. Explicitly passing a port number will override
the setting in ~/.ssh/config (some people run an ssh server on an
alternative port for some services).
James.
More information about the bazaar
mailing list