From ae1f7b256070a681d3951502ba4367f6baaa7821 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 22 Apr 2009 15:44:07 -0400 Subject: [PATCH] Don't try to libvirt/images if we don't have access to it. --- src/virtManager/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/virtManager/config.py b/src/virtManager/config.py index 36017fa19..394f67f6e 100644 --- a/src/virtManager/config.py +++ b/src/virtManager/config.py @@ -435,9 +435,10 @@ class vmmConfig: if connection.get_type() == "Xen": return DEFAULT_XEN_IMAGE_DIR - if connection.is_qemu_session(): + if (connection.is_qemu_session() or + not os.access(DEFAULT_VIRT_IMAGE_DIR, os.W_OK)): return os.getcwd() - + # Just return the default dir since the intention is that it # is a managed pool and the user will be able to install to it. return DEFAULT_VIRT_IMAGE_DIR