← Back to team overview

ubuntu-bugcontrol team mailing list archive

Re: [Merge] ~wqian/ubuntu-qa-tools:postcmd_feat into ubuntu-qa-tools:master

 

Review: Needs Information

Overall is good. Good idea. I'm wondering if having a --enable-pro instead would make it more sense to avoid changing the config every time you need to enable/disable pro.

Diff comments:

> diff --git a/vm-tools/uvt b/vm-tools/uvt
> index 683ce0a..66efd8b 100755
> --- a/vm-tools/uvt
> +++ b/vm-tools/uvt
> @@ -784,6 +788,23 @@ def cmd_remove():
>              if not confirm("Do you want to continue?"):
>                  continue
>  
> +        if vm_running(machine) == False:
> +            vm_start(machine)
> +            if vm_start_wait(machine, quiet=True) == False:
> +                print("Could not start VM: %s" % machine)
> +                return False
> +
> +        # Wait a couple of seconds for the DHCP to settle down
> +        time.sleep(2)
> +
> +        command = ("pro detach --assume-yes")
> +        vm_run_command(machine, command, root=True, force_keys=True)
> +
> +        vm_stop(machine)
> +        if not vm_stop_wait(machine, quiet=True):
> +            print("Error: VM '%s' could not be stopped." % machine, file=sys.stderr)
> +            return False

With the return False here, the next condition to destroy them machine will never be reached, right?

> +
>          if vm_running(machine) == True:
>              print("Destroying '%s'" % machine)
>              vm_destroy(machine)


-- 
https://code.launchpad.net/~wqian/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/490758
Your team Ubuntu Bug Control is subscribed to branch ubuntu-qa-tools:master.



Follow ups

References