SSH has an exit code of 255 and prints out an error message when
it reaches a connection timeout. We should catch this and return
a sensible exception.
Also, bit-shift all exit codes by 8 to match what we're now doing
in the client.
From: Jeremy Orlow <jorlow@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1170 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/utils.py b/server/utils.py
index f02beba..2dc7c90 100644
--- a/server/utils.py
+++ b/server/utils.py
@@ -228,8 +228,9 @@
# We are holding ends to stdin, stdout pipes
# hence we need to be sure to close those fds no mater what
start_time = time.time()
- result.exit_status = _wait_for_command(sp, start_time, timeout,
- stdout_file, stderr_file, stdout_tee, stderr_tee)
+ ret = _wait_for_command(sp, start_time, timeout, stdout_file,
+ stderr_file, stdout_tee, stderr_tee)
+ result.exit_status = ret >> 8
result.duration = time.time() - start_time
# don't use os.read now, so we get all the rest of the output