diff -r 531b73491ac2 virt-install --- a/virt-install Wed Oct 10 14:24:48 2007 -0400 +++ b/virt-install Wed Oct 17 16:50:23 2007 -0400 @@ -160,11 +160,18 @@ def get_fullvirt_cdrom(cdpath, location, while 1: cdpath = cli.prompt_for_input(_("What is the virtual CD image, CD device or install location?"), cdpath) try: + cddisk = virtinst.VirtualDisk(path=cdpath, + transient=True, + device=virtinst.VirtualDisk.DEVICE_CDROM, + readOnly=True) guest.cdrom = cdpath break except ValueError, e: print _("ERROR: "), e cdpath = None + + # Clear disk as we only used it for validation + cddisk = None ### Option parsing def check_before_store(option, opt_str, value, parser): diff -r 531b73491ac2 virtinst/Guest.py --- a/virtinst/Guest.py Wed Oct 10 14:24:48 2007 -0400 +++ b/virtinst/Guest.py Wed Oct 17 16:50:23 2007 -0400 @@ -50,11 +50,11 @@ class VirtualDisk: if self.path is not None: if __builtin__.type(self.path) is not __builtin__.type("string"): - raise ValueError, _("The disk path must be a string or None.") + raise ValueError, _("The %s path must be a string or None.") % device self.path = os.path.abspath(self.path) if self.path != None and os.path.isdir(self.path): - raise ValueError, _("The disk path must be a file or a device, not a directory") + raise ValueError, _("The %s path must be a file or a device, not a directory") % device if not os.path.exists(os.path.dirname(self.path)): raise ValueError, _("The specified path's root directory must exist.")