We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2317c2f commit c9ede18Copy full SHA for c9ede18
pssh/pssh_client.py
@@ -401,8 +401,10 @@ def join(self, output):
401
"""Block until all remote commands in output have finished
402
and retrieve exit codes"""
403
for host in output:
404
- for line in output[host]['stdout']:
405
- pass
+ stdout = output[host].get('stdout')
+ if stdout:
406
+ for _ in stdout:
407
+ pass
408
self.get_exit_codes(output)
409
410
def get_exit_codes(self, output):
@@ -429,7 +431,7 @@ def get_exit_code(self, host_output):
429
431
430
432
def _get_exit_code(self, channel):
433
"""Get exit code from channel if ready"""
- if not channel.exit_status_ready():
434
+ if not channel or not channel.exit_status_ready():
435
return
436
channel.close()
437
return channel.recv_exit_status()
0 commit comments