Skip to content

Commit ededa3f

Browse files
author
Dan
committed
Fix channel timeout regression and test
1 parent 90c6812 commit ededa3f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pssh.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
232232
if self.forward_ssh_agent:
233233
agent_handler = paramiko.agent.AgentRequestHandler(channel)
234234
channel.get_pty()
235-
if self.timeout:
236-
channel.settimeout(self.timeout)
235+
# if self.timeout:
236+
# channel.settimeout(self.timeout)
237237
_stdout, _stderr = channel.makefile('rb'), \
238238
channel.makefile_stderr('rb')
239239
stdout, stderr = self._read_output_buffer(_stdout,), \

tests/test_pssh_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ def test_pssh_client_timeout(self):
210210
raise server.exception
211211
except gevent.Timeout:
212212
pass
213-
chan_timeout = output['127.0.0.1']['channel'].gettimeout()
214-
self.assertEqual(client_timeout, chan_timeout,
215-
msg="Channel timeout %s does not match requested timeout %s" %(
216-
chan_timeout, client_timeout,))
213+
# chan_timeout = output['127.0.0.1']['channel'].gettimeout()
214+
# self.assertEqual(client_timeout, chan_timeout,
215+
# msg="Channel timeout %s does not match requested timeout %s" %(
216+
# chan_timeout, client_timeout,))
217217
del client
218218
server.join()
219219

0 commit comments

Comments
 (0)