Skip to content

Commit 8b235be

Browse files
author
Dan
committed
Simplified generating output
1 parent 4d2035f commit 8b235be

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pssh.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,13 @@ def get_output(self, commands=None):
575575
commands = list(self.pool.greenlets)
576576
output = {}
577577
for cmd in commands:
578-
for (channel, host, stdout, stderr) in [cmd.get()]:
579-
output.setdefault(host, {})
580-
output[host].update({'exit_code': self._get_exit_code(channel),
581-
'channel' : channel,
582-
'stdout' : stdout,
583-
'stderr' : stderr,
584-
'cmd' : cmd, })
578+
(channel, host, stdout, stderr) = cmd.get()
579+
output.setdefault(host, {})
580+
output[host].update({'exit_code': self._get_exit_code(channel),
581+
'channel' : channel,
582+
'stdout' : stdout,
583+
'stderr' : stderr,
584+
'cmd' : cmd, })
585585
return output
586586

587587
def get_exit_code(self, host_output):

0 commit comments

Comments
 (0)