Also, fixed a typo.
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
client/virt/tests/save_restore.py | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/client/virt/tests/save_restore.py
b/client/virt/tests/save_restore.py
index b3da92f..64ccf4c 100644
--- a/client/virt/tests/save_restore.py
+++ b/client/virt/tests/save_restore.py
@@ -49,13 +49,14 @@ def run_save_restore(test, params, env):
"""
session = None
try:
- session = vm.wait_for_login(timeout=timeout)
- result = session.is_responsive(timeout=timeout/10.0)
- if not result:
- logging.warning("Login session established, but
non-responsive")
- # assume guest is just busy with stuff
- except:
- raise error.TestFail("VM check timed out and/or VM non-responsive")
+ try:
+ session = vm.wait_for_login(timeout=timeout)
+ result = session.is_responsive(timeout=timeout/10.0)
+ if not result:
+ logging.warning("Login session established, but
non-responsive")
+ # assume guest is just busy with stuff
+ except:
+ raise error.TestFail("VM check timed out and/or VM
non-responsive")
finally:
del session
@@ -80,7 +81,7 @@ def run_save_restore(test, params, env):
bg_command_pid = int(session.cmd('jobs -rp'))
except ValueError:
logging.warning("Background guest command 'job -rp' output not
PID")
- bg_command_pid = none
+ bg_command_pid = None
del session # don't leave stray ssh session lying around over save/restore
start_time = time.time()
--
1.7.7.6
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest