From ededa3f4a2af26ccf4d2323236395d68956232df Mon Sep 17 00:00:00 2001 From: Dan <22e889d8@opayq.com> Date: Tue, 11 Aug 2015 14:38:31 +0100 Subject: [PATCH] Fix channel timeout regression and test --- pssh.py | 4 ++-- tests/test_pssh_client.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pssh.py b/pssh.py index bb3e25c5..56077326 100644 --- a/pssh.py +++ b/pssh.py @@ -232,8 +232,8 @@ def exec_command(self, command, sudo=False, user=None, **kwargs): if self.forward_ssh_agent: agent_handler = paramiko.agent.AgentRequestHandler(channel) channel.get_pty() - if self.timeout: - channel.settimeout(self.timeout) + # if self.timeout: + # channel.settimeout(self.timeout) _stdout, _stderr = channel.makefile('rb'), \ channel.makefile_stderr('rb') stdout, stderr = self._read_output_buffer(_stdout,), \ diff --git a/tests/test_pssh_client.py b/tests/test_pssh_client.py index 3234e1dd..c2213fd2 100644 --- a/tests/test_pssh_client.py +++ b/tests/test_pssh_client.py @@ -210,10 +210,10 @@ def test_pssh_client_timeout(self): raise server.exception except gevent.Timeout: pass - chan_timeout = output['127.0.0.1']['channel'].gettimeout() - self.assertEqual(client_timeout, chan_timeout, - msg="Channel timeout %s does not match requested timeout %s" %( - chan_timeout, client_timeout,)) + # chan_timeout = output['127.0.0.1']['channel'].gettimeout() + # self.assertEqual(client_timeout, chan_timeout, + # msg="Channel timeout %s does not match requested timeout %s" %( + # chan_timeout, client_timeout,)) del client server.join()