summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-01-17 14:27:05 +0000
committerGerrit Code Review <review@openstack.org>2012-01-17 14:27:05 +0000
commit2012f1df0859be082f67ee982d5d0d4b6cf2c3d9 (patch)
treeb7e69a5725ab261a0236ab857552f70c7864f976 /nova
parent7913b0b789c5034493630b4f31fd3ad050dca4f5 (diff)
parent144c4f954ee874982c369da60a9a794e2dca7df9 (diff)
downloadnova-2012f1df0859be082f67ee982d5d0d4b6cf2c3d9.tar.gz
nova-2012f1df0859be082f67ee982d5d0d4b6cf2c3d9.tar.xz
nova-2012f1df0859be082f67ee982d5d0d4b6cf2c3d9.zip
Merge "improve handling of the img_handlers config list"
Diffstat (limited to 'nova')
-rw-r--r--nova/virt/disk/api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py
index 47d56c954..9a457a318 100644
--- a/nova/virt/disk/api.py
+++ b/nova/virt/disk/api.py
@@ -120,9 +120,12 @@ class _DiskImage(object):
# As a performance tweak, don't bother trying to
# directly loopback mount a cow image.
self.handlers = FLAGS.img_handlers[:]
- if use_cow:
+ if use_cow and 'loop' in self.handlers:
self.handlers.remove('loop')
+ if not self.handlers:
+ raise exception.Error(_('no capable image handler configured'))
+
@property
def errors(self):
"""Return the collated errors from all operations."""