python-virtinst

changeset 1102:7df4e1b4e25e

VirtualDisk: Fix LVM/Disk volume creation on QEMU

Make sure that a vol_install actually supports the format parameter before
we try and read it.
author Cole Robinson <crobinso@redhat.com>
date Wed Oct 21 10:51:21 2009 -0400 (2009-10-21)
parents 08ea24699015
children 26d7a3e52035
files virtinst/VirtualDisk.py
line diff
     1.1 --- a/virtinst/VirtualDisk.py	Tue Oct 20 16:36:41 2009 -0400
     1.2 +++ b/virtinst/VirtualDisk.py	Wed Oct 21 10:51:21 2009 -0400
     1.3 @@ -645,8 +645,9 @@
     1.4  
     1.5          elif self.vol_install:
     1.6              if drvname == self.DRIVER_QEMU:
     1.7 -                drvtype = _qemu_sanitize_drvtype(self.type,
     1.8 -                                                 self.vol_install.format)
     1.9 +                if hasattr(self.vol_install, "format"):
    1.10 +                    drvtype = _qemu_sanitize_drvtype(self.type,
    1.11 +                                                     self.vol_install.format)
    1.12  
    1.13          elif self.__creating_storage():
    1.14              if drvname == self.DRIVER_QEMU: