Merge "improve handling of the img_handlers config list"
This commit is contained in:
commit
2012f1df08
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue