Skip to content

Commit f9e37fd

Browse files
authored
Merge pull request #1667 from SmithChart/sshdriver
SSHDriver: Fix Timeout handling on start_own_master()
2 parents b8babc1 + 9db6b79 commit f9e37fd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

labgrid/driver/sshdriver.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,11 @@ def _start_own_master(self):
9797
# connection refused during target startup
9898
connect_timeout = round(timeout.remaining)
9999
while True:
100-
if connect_timeout == 0:
101-
raise Exception("Timeout while waiting for ssh connection")
102100
try:
103101
return self._start_own_master_once(connect_timeout)
104102
except ExecutionError as e:
105103
if timeout.expired:
106-
raise e
104+
raise Exception("Timeout while waiting for ssh connection") from e
107105
time.sleep(0.5)
108106
connect_timeout = round(timeout.remaining)
109107

0 commit comments

Comments
 (0)