On Thu, Jul 12, 2012 at 10:00 AM, Feng Yang <fy...@redhat.com> wrote: > in virt/virt_env_process.py, > def _call_image_func(): > should use try...finally to make sure the vm is alway resumed back.
Fair enough, applied to next, thanks! > Signed-off-by: Feng Yang <fy...@redhat.com> > --- > client/virt/virt_env_process.py | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py > index bb74472..9d90093 100644 > --- a/client/virt/virt_env_process.py > +++ b/client/virt/virt_env_process.py > @@ -232,9 +232,11 @@ def process(test, params, env, image_func, vm_func, > vm_first=False): > # Call image_func for each image > if vm is not None and vm.is_alive(): > vm.pause() > - image_func(test, image_params, image_name) > - if vm is not None and vm.is_alive(): > - vm.resume() > + try: > + image_func(test, image_params, image_name) > + finally: > + if vm is not None and vm.is_alive(): > + vm.resume() > else: > for image_name in params.objects("images"): > image_params = params.object_params(image_name) > -- > 1.7.1 > > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest -- Lucas _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest