mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virtManager.clone: don't generate clone path if we don't default to clone
If we don't default to clone the disk in question don't try to generate and assign default clone_path, this will force user to select the path explicitly and avoid some unnecessary errors in debug log. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
d93203022a
commit
79baf8e30c
@ -407,6 +407,13 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
storage_add(cloneinfo)
|
||||
continue
|
||||
|
||||
storage_row[STORAGE_INFO_CAN_CLONE] = True
|
||||
|
||||
# If we cannot create default clone_path don't even try to do that
|
||||
if not default:
|
||||
storage_add()
|
||||
continue
|
||||
|
||||
try:
|
||||
# Generate disk path, make sure that works
|
||||
clone_path = self.generate_clone_path_name(path)
|
||||
@ -421,7 +428,6 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
clone_path)
|
||||
storage_add(str(e))
|
||||
|
||||
storage_row[STORAGE_INFO_CAN_CLONE] = True
|
||||
storage_row[STORAGE_INFO_NEW_PATH] = clone_path
|
||||
storage_row[STORAGE_INFO_SIZE] = self.pretty_storage(size)
|
||||
storage_add()
|
||||
|
Loading…
Reference in New Issue
Block a user