add get_transport() to fetch the Transport from an SSHClient.
This commit is contained in:
Robey Pointer 2007-11-09 22:51:21 -08:00
parent 9bc7c13ad7
commit 645bdfd861
1 changed files with 11 additions and 0 deletions

View File

@ -348,6 +348,17 @@ class SSHClient (object):
@rtype: L{SFTPClient}
"""
return self._transport.open_sftp_client()
def get_transport(self):
"""
Return the underlying L{Transport} object for this SSH connection.
This can be used to perform lower-level tasks, like opening specific
kinds of channels.
@return: the Transport for this connection
@rtype: L{Transport}
"""
return self._transport
def _auth(self, username, password, pkey, key_filename):
"""