remote: ssh: connection: remove open_max_sftp_channels

This commit is contained in:
pared
2019-08-12 11:01:02 +02:00
committed by pawel
parent 132b571e72
commit 394d6ffeeb
-12
View File
@@ -289,15 +289,3 @@ class SSHConnection:
def cp(self, src, dest):
self.makedirs(posixpath.dirname(dest))
self.execute("cp {} {}".format(src, dest))
def open_max_sftp_channels(self):
# If there are more than 1 it means we've already opened max amount
if len(self._sftp_channels) <= 1:
while True:
try:
self._sftp_channels.append(self._ssh.open_sftp())
except paramiko.ssh_exception.ChannelException:
if not self._sftp_channels:
raise
break
return self._sftp_channels