[libvirt] [PATCH libvirt-sanbox] image: ignore OSError on listdir()

Daniel P. Berrange berrange at redhat.com
Thu Aug 4 13:13:23 UTC 2016


On Thu, Aug 04, 2016 at 05:01:37PM +0400, marcandre.lureau at redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
> 
> If the directory to list is missing, don't raise an exception but
> return empty list instead. This fixes for example running
> "virt-sandbox-image list" without a
> ~/.local/share/libvirt/templates/virt-builder.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
>  libvirt-sandbox/image/sources/docker.py      | 18 +++++++++++++++---
>  libvirt-sandbox/image/sources/virtbuilder.py |  6 +++++-
>  2 files changed, 20 insertions(+), 4 deletions(-)
>  mode change 100644 => 100755 libvirt-sandbox/image/sources/docker.py
>  mode change 100644 => 100755 libvirt-sandbox/image/sources/virtbuilder.py

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list