25 lines
968 B
Diff
25 lines
968 B
Diff
|
Subject: addhw: Fix adding empty cdrom/floppy drive
|
||
|
From: Cole Robinson crobinso@redhat.com Wed Mar 12 16:54:14 2014 -0400
|
||
|
Date: Wed Mar 12 16:54:14 2014 -0400:
|
||
|
Git: abb3920ac6b1e24d2f50faad2772e31ddabcb1c9
|
||
|
|
||
|
|
||
|
diff --git a/virtManager/addstorage.py b/virtManager/addstorage.py
|
||
|
index 68558c9..2d15a57 100644
|
||
|
--- a/virtManager/addstorage.py
|
||
|
+++ b/virtManager/addstorage.py
|
||
|
@@ -324,11 +324,11 @@ class vmmAddStorage(vmmGObjectUI):
|
||
|
if is_default:
|
||
|
path = self._check_ideal_path(path, vmname, collidelist)
|
||
|
|
||
|
- if not path and device != "disk":
|
||
|
+ if not path and device in ["disk", "lun"]:
|
||
|
return self.err.val_err(_("A storage path must be specified."))
|
||
|
|
||
|
disk = virtinst.VirtualDisk(conn)
|
||
|
- disk.path = path
|
||
|
+ disk.path = path or None
|
||
|
disk.read_only = readonly
|
||
|
disk.device = device
|
||
|
disk.set_create_storage(size=size, sparse=sparse,
|