On 12/05/2011 03:49 PM, Chris Evich wrote:
> Signed-off-by: Chris Evich<[email protected]>
I guess this patch you have forgotten to merge with the other patches,
as it looks a bug fix for one of your previous patches.
> ---
> client/virt/libvirt_vm.py | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
> index ef00414..34f8379 100644
> --- a/client/virt/libvirt_vm.py
> +++ b/client/virt/libvirt_vm.py
> @@ -216,14 +216,17 @@ def virsh_restore(name, uri = "", path = ""):
> logging.error("Cannon restore VM that is %s" % state)
> return False
> logging.debug("Restoring VM from %s" % path)
> - # Restore automatically removes the state file when successful
> result = virsh_cmd("restore %s" % path)
> + try: # always remove state file in case storage changed
> + os.unlink(path)
> + except OSError:
> + pass # ignore missing files
> state = virsh_domstate(name, uri)
> if state in ('paused',):
> return True
> else:
> logging.error("Restoring VM from %s failed in state %s." %
> - (path,state)
> + (path,state))
> return False
>
> def virsh_start(name, uri = ""):
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest