add a get_channel() method to SFTPClient, to retrieve the underlying channel.
This commit is contained in:
parent
3229cd0f94
commit
afa5e0594e
|
@ -115,6 +115,18 @@ class SFTPClient (BaseSFTP):
|
||||||
self._log(INFO, 'sftp session closed.')
|
self._log(INFO, 'sftp session closed.')
|
||||||
self.sock.close()
|
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='.'):
|
def listdir(self, path='.'):
|
||||||
"""
|
"""
|
||||||
Return a list containing the names of the entries in the given C{path}.
|
Return a list containing the names of the entries in the given C{path}.
|
||||||
|
|
Loading…
Reference in New Issue