Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pssh/pssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,10 @@ def join(self, output):
"""Block until all remote commands in output have finished
and retrieve exit codes"""
for host in output:
for line in output[host]['stdout']:
pass
stdout = output[host].get('stdout')
if stdout:
for _ in stdout:
pass
self.get_exit_codes(output)

def get_exit_codes(self, output):
Expand All @@ -429,7 +431,7 @@ def get_exit_code(self, host_output):

def _get_exit_code(self, channel):
"""Get exit code from channel if ready"""
if not channel.exit_status_ready():
if not channel or not channel.exit_status_ready():
return
channel.close()
return channel.recv_exit_status()
Expand Down