summaryrefslogtreecommitdiff
path: root/paramiko
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2007-05-20 15:57:04 -0700
committerRobey Pointer <robey@lag.net>2007-05-20 15:57:04 -0700
commitafa5e0594e5095106fc9ef7824820d26fec274a6 (patch)
tree0235a4307f638ce5df8837e60ef951ec04a1ada1 /paramiko
parent3229cd0f94c75504e66e40cce088a3ed4c6edfec (diff)
downloadparamiko-afa5e0594e5095106fc9ef7824820d26fec274a6.tar.gz
[project @ robey@lag.net-20070520225704-j1czjtrl2hu7t1pj]
add a get_channel() method to SFTPClient, to retrieve the underlying channel.
Diffstat (limited to 'paramiko')
-rw-r--r--paramiko/sftp_client.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index f79187d3..efb75ceb 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}.