From afa5e0594e5095106fc9ef7824820d26fec274a6 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sun, 20 May 2007 15:57:04 -0700 Subject: [PATCH] [project @ robey@lag.net-20070520225704-j1czjtrl2hu7t1pj] add a get_channel() method to SFTPClient, to retrieve the underlying channel. --- paramiko/sftp_client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index f79187d..efb75ce 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -115,6 +115,18 @@ class SFTPClient (BaseSFTP): self._log(INFO, 'sftp session closed.') self.sock.close() + def get_channel(self): + """ + Return the underlying L{Channel} object for this SFTP session. This + might be useful for doing things like setting a timeout on the channel. + + @return: the SSH channel + @rtype: L{Channel} + + @since: 1.7.1 + """ + return self.sock + def listdir(self, path='.'): """ Return a list containing the names of the entries in the given C{path}.