[Libguestfs] [libnbd PATCH v2] nbdsh: Catch nbd.Error from -c arguments
Richard W.M. Jones
rjones at redhat.com
Tue Sep 22 19:58:22 UTC 2020
On Tue, Sep 22, 2020 at 11:15:39AM -0500, Eric Blake wrote:
> + try:
> + for c in args.command:
> + if c != '-':
> + exec(c, d, d)
> + else:
> + exec(sys.stdin.read(), d, d)
> + except nbd.Error as ex:
> + if os.environ.get("LIBNBD_DEBUG", "0") == "1":
Would it be better to use nbd.NBD().get_debug() == True, or
h.get_debug() == True for this test instead of duplicating the logic
inside libnbd?
But sure, let's do this. ACK.
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