Fix up errors in handling of exceptions from ssh_ping
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@992 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/ssh_host.py b/server/hosts/ssh_host.py
index fd3d74a..2edc6b3 100644
--- a/server/hosts/ssh_host.py
+++ b/server/hosts/ssh_host.py
@@ -501,14 +501,10 @@
"""
try:
self.ssh_ping()
- except errors.AutoservRunError:
+ except:
return False
- else:
- if result.exit_status == 0:
- return True
- else:
+ return True
- return False
def wait_up(self, timeout=None):
"""
@@ -530,11 +526,10 @@
while not timeout or time.time() < end_time:
try:
self.ssh_ping()
- except errors.AutoservRunError:
+ except:
pass
else:
- if result.exit_status == 0:
- return True
+ return True
time.sleep(1)
return False
@@ -560,11 +555,8 @@
while not timeout or time.time() < end_time:
try:
self.ssh_ping()
- except errors.AutoservRunError:
+ except:
return True
- else:
- if result.aborted:
- return True
time.sleep(1)
return False