From b6630c2a637b7f0d89df5c63c018bad9b82613d9 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 6 Mar 2017 16:30:07 -0500 Subject: [PATCH] clone: Don't error if disk doesn't have a backing volume --- virtManager/clone.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/virtManager/clone.py b/virtManager/clone.py index 89db699c9..e3fee0c5b 100644 --- a/virtManager/clone.py +++ b/virtManager/clone.py @@ -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): info = append_str(info, _("No write access")) - pool_type = vol.get_parent_pool().get_type() - if pool_type == virtinst.StoragePool.TYPE_SCSI: - info = append_str(info, _("SCSI device")) - elif pool_type == virtinst.StoragePool.TYPE_DISK: - info = append_str(info, _("Disk device")) - elif pool_type == virtinst.StoragePool.TYPE_ISCSI: - info = append_str(info, _("iSCSI share")) + if vol: + pool_type = vol.get_parent_pool().get_type() + if pool_type == virtinst.StoragePool.TYPE_SCSI: + info = append_str(info, _("SCSI device")) + elif pool_type == virtinst.StoragePool.TYPE_DISK: + info = append_str(info, _("Disk device")) + elif pool_type == virtinst.StoragePool.TYPE_ISCSI: + info = append_str(info, _("iSCSI share")) if shared: info = append_str(info, _("Shareable"))