Skip to content

Commit

Permalink
Simplified generating output
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Jan 9, 2015
1 parent 4d2035f commit 8b235be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,13 @@ def get_output(self, commands=None):
commands = list(self.pool.greenlets)
output = {}
for cmd in commands:
for (channel, host, stdout, stderr) in [cmd.get()]:
output.setdefault(host, {})
output[host].update({'exit_code': self._get_exit_code(channel),
'channel' : channel,
'stdout' : stdout,
'stderr' : stderr,
'cmd' : cmd, })
(channel, host, stdout, stderr) = cmd.get()
output.setdefault(host, {})
output[host].update({'exit_code': self._get_exit_code(channel),
'channel' : channel,
'stdout' : stdout,
'stderr' : stderr,
'cmd' : cmd, })
return output

def get_exit_code(self, host_output):
Expand Down

0 comments on commit 8b235be

Please sign in to comment.