From 0e1990a2bbe72af30f7ae9d8aca91b8d3731051c Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 12 Aug 2015 11:28:38 +0100 Subject: [PATCH] ssh: fixed error reporting on failed exit code extraction. --- wlauto/utils/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wlauto/utils/ssh.py b/wlauto/utils/ssh.py index d6d3db7a..44a00aac 100644 --- a/wlauto/utils/ssh.py +++ b/wlauto/utils/ssh.py @@ -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: