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.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v