[Libguestfs] [PATCH 4/5] dib: require a Python interpreter

Richard W.M. Jones rjones at redhat.com
Wed Mar 22 15:56:57 UTC 2017


On Wed, Mar 22, 2017 at 11:19:49AM +0100, Pino Toscano wrote:
>    if elements = [] && machine_readable then (
> @@ -246,6 +252,19 @@ read the man page virt-dib(1).
>    if elements = [] then
>      error (f_"at least one distribution root element must be specified");
>  
> +  let python =
> +    match python with
> +    | Some exe ->
> +      let p =
> +        if Filename.is_relative exe then

IIUC what you mean here is "the 'exe' filename doesn't contain
any slashes"?  That isn't what is written above.

> +          get_required_tool exe
> +        else (
> +          Unix.access exe [Unix.X_OK];
> +          exe
> +        ) in
> +      Some p
> +    | None -> None in

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list