SFTP transport raises a TypeError exception in a except block if self._port is None
Bug #49363 reported by
Lukáš Lalinský
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Patch to fix it:
--- sftp.py.orig 2006-06-11 16:13:04.359375000 +0200
+++ sftp.py 2006-06-11 16:12:11.546875000 +0200
@@ -746,7 +746,7 @@
except paramiko.
raise ConnectionError
- (self._host, self._port), e)
+ (self._host, self._port or 22), e)
server_key = t.get_remote_
To post a comment you must log in.
Lukáš Lalinský wrote: SSHException, e: ('Unable to reach SSH host %s:%d' % server_ key() util.hexify( server_ key.get_ fingerprint( ))
> Public bug reported:
>
> Patch to fix it:
>
> --- sftp.py.orig 2006-06-11 16:13:04.359375000 +0200
> +++ sftp.py 2006-06-11 16:12:11.546875000 +0200
> @@ -746,7 +746,7 @@
> t.start_client()
> except paramiko.
> raise ConnectionError
> - (self._host, self._port), e)
> + (self._host, self._port or 22), e)
>
> server_key = t.get_remote_
> server_key_hex = paramiko.
>
> ** Affects: bzr (upstream)
> Importance: Untriaged
> Status: Unconfirmed
>
> ** Summary changed:
>
> - SFTP transport raises a TypeError exception is a except block if self._port is None
> + SFTP transport raises a TypeError exception in a except block if self._port is None
>
I would say the correct fix would be to change :%d => :%s, because _port
== None is an important difference (especially in the case that a user
customizes ~/.ssh/config).
John
=:->