addhw: Allow specifying empty cdrom/floppy devices

This commit is contained in:
Cole Robinson 2012-02-07 16:51:16 -05:00
parent 97d3b46b77
commit 101d328ed6

View File

@ -607,7 +607,7 @@ class vmmAddHardware(vmmGObjectUI):
else:
path = self.widget("config-storage-entry").get_text()
return (path, size, sparse)
return (path or None, size, sparse)
def get_config_disk_target(self):
target = self.widget("config-storage-devtype")
@ -1262,9 +1262,6 @@ class vmmAddHardware(vmmGObjectUI):
if do_use:
diskpath = ideal
if not diskpath:
return self.err.val_err(_("A storage path must be specified."))
disk = virtinst.VirtualDisk(conn=self.conn.vmm,
path=diskpath,
size=disksize,