And after this commit:

https://gitlab.com/nbdkit/libnbd/-/commit/3a49373a78a611af7497f76b797c78d612f47c84

You can use a with-style to automatically close the handle:

    with nbd.nbd() as h:
        # use the handle 'h'

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to