summaryrefslogtreecommitdiff
path: root/virtinst/connection.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2017-08-30 10:34:17 -0400
committerCole Robinson <crobinso@redhat.com>2017-08-30 10:34:17 -0400
commitec0d3072c07165afa46c663267decb366a66457d (patch)
tree3db38278c36cdb9e8143f557e36100e9fb5f5ed1 /virtinst/connection.py
parent427592bc7b9cab676456dbee11922f2bc61380a1 (diff)
downloadvirt-manager-ec0d3072c07165afa46c663267decb366a66457d.tar.gz
virtinst: connection: Fix error caching new pool
$ virt-install --connect test:///default --name foo --ram 64 --import --disk /tmp/idontexist.img ERROR Error: --disk /tmp/idontexist.img: 'vols'
Diffstat (limited to 'virtinst/connection.py')
-rw-r--r--virtinst/connection.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/virtinst/connection.py b/virtinst/connection.py
index d6d66fca..0b2fbb04 100644
--- a/virtinst/connection.py
+++ b/virtinst/connection.py
@@ -249,6 +249,9 @@ class VirtualConnection(object):
poollist = self._fetch_cache[self._FETCH_KEY_POOLS]
poolxmlobj = self._build_pool_raw(poolobj)
poollist.append(poolxmlobj)
+
+ if self._FETCH_KEY_VOLS not in self._fetch_cache:
+ return
vollist = self._fetch_cache[self._FETCH_KEY_VOLS]
vollist.extend(self._fetch_vols_raw(poolxmlobj))