Skip to content

Commit

Permalink
Fix channel timeout regression and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan committed Aug 11, 2015
1 parent 90c6812 commit ededa3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,), \
Expand Down
8 changes: 4 additions & 4 deletions tests/test_pssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit ededa3f

Please sign in to comment.