1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

ssh: raise correct error on EOF

Raise DeviceError, rather than TargetError, on EOF inside ssh_get_shell.
This is a fix for an issue introduced by a devlib backport in 51db53d9.
This commit is contained in:
Sergei Trofimov 2017-07-03 11:00:15 +01:00
parent 53203bfb50
commit 1238cb71f0

View File

@ -58,7 +58,7 @@ def ssh_get_shell(host, username, password=None, keyfile=None, port=None, timeou
timeout -= time.time() - start_time
if timeout <= 0:
message = 'Could not connect to {}; is the host name correct?'
raise TargetError(message.format(host))
raise DeviceError(message.format(host))
time.sleep(5)
conn.setwinsize(500,200)