Skip to content

Commit ecf56fc

Browse files
author
Dan
committed
Updates to support python 2.6. Added 2.6 target to travis config
1 parent 406cf9a commit ecf56fc

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: python
22
python:
3-
- "2.7"
3+
- 2.6
4+
- 2.7
45
install:
56
- pip install -r requirements.txt
67
- pip install coveralls

pssh.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,16 @@ def get_output(self, commands=None):
573573
"""
574574
if not commands:
575575
commands = list(self.pool.greenlets)
576-
return {host: {'exit_code': self._get_exit_code(channel),
577-
'channel' : channel,
578-
'stdout' : stdout,
579-
'stderr' : stderr,
580-
'cmd' : cmd, }
581-
for cmd in commands
582-
for (channel, host, stdout, stderr) in [cmd.get()]}
576+
output = {}
577+
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, })
585+
return output
583586

584587
def get_exit_code(self, host_output):
585588
"""Get exit code from host output if available

0 commit comments

Comments
 (0)