1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

ssh: fixed error reporting on failed exit code extraction.

This commit is contained in:
Sergei Trofimov 2015-08-12 11:28:38 +01:00
parent 14f5858e3d
commit 0e1990a2bb

View File

@ -164,7 +164,7 @@ class SshShell(object):
if exit_code:
message = 'Got exit code {}\nfrom: {}\nOUTPUT: {}'
raise DeviceError(message.format(exit_code, command, output))
except ValueError:
except (ValueError, IndexError):
logger.warning('Could not get exit code for "{}",\ngot: "{}"'.format(command, exit_code_text))
return output
except EOF: