aboutsummaryrefslogtreecommitdiff
path: root/rumba/ssh_support.py
diff options
context:
space:
mode:
Diffstat (limited to 'rumba/ssh_support.py')
-rw-r--r--rumba/ssh_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rumba/ssh_support.py b/rumba/ssh_support.py
index 64d17e6..8b07c13 100644
--- a/rumba/ssh_support.py
+++ b/rumba/ssh_support.py
@@ -163,9 +163,9 @@ def execute_commands(testbed, ssh_config, commands, time_out=3):
chan.exec_command(command)
except paramiko.ssh_exception.SSHException as e:
raise SSHException('Failed to execute command')
- if (chan.recv_exit_status() != 0):
- raise SSHException('A remote command returned an error')
o = _print_stream(stdout)
+ if (chan.recv_exit_status() != 0):
+ raise SSHException('A remote command returned an error.\n' + o)
ssh_client.close()
return o