clone: Don't error if disk doesn't have a backing volume

This commit is contained in:
Cole Robinson 2017-03-06 16:30:07 -05:00
parent 8a00e493b5
commit b6630c2a63

View File

@ -116,13 +116,14 @@ def do_we_default(conn, vol, path, ro, shared, devtype):
elif not vol and path and not os.access(path, os.W_OK): elif not vol and path and not os.access(path, os.W_OK):
info = append_str(info, _("No write access")) info = append_str(info, _("No write access"))
pool_type = vol.get_parent_pool().get_type() if vol:
if pool_type == virtinst.StoragePool.TYPE_SCSI: pool_type = vol.get_parent_pool().get_type()
info = append_str(info, _("SCSI device")) if pool_type == virtinst.StoragePool.TYPE_SCSI:
elif pool_type == virtinst.StoragePool.TYPE_DISK: info = append_str(info, _("SCSI device"))
info = append_str(info, _("Disk device")) elif pool_type == virtinst.StoragePool.TYPE_DISK:
elif pool_type == virtinst.StoragePool.TYPE_ISCSI: info = append_str(info, _("Disk device"))
info = append_str(info, _("iSCSI share")) elif pool_type == virtinst.StoragePool.TYPE_ISCSI:
info = append_str(info, _("iSCSI share"))
if shared: if shared:
info = append_str(info, _("Shareable")) info = append_str(info, _("Shareable"))