On Thu, Oct 27, 2022 at 09:37:41AM +0100, Richard W.M. Jones wrote:
It's confusing having patches 1 & 3 separate.
I can't help thinking this whole series would be easier to understand
if instead of building a list of Python commands as strings, we built
a list of "instructions", where an instruction is a qualified union
which (in OCaml) would be:
type instruction =
| Command of string (* -c *)
| URI of string (* -u *)
| OptMode (* --opt-mode *)
etc
and then we'd run through the instructions in order at the end. It
gets rid of the awkward quoting problems too.
We still need an argparse Action subclass to preserve ordering, but
having -c ALSO use that subclass does make sense. I'll rework the
patch along those lines.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org