if init_token is None:
init_token = ""
+ distro = session['image'].distro
+ ostype = session['image'].ostype
name = WizardInputPage(
"ImageName", "Image Name", "Please provide a name for the image:",
- title="Image Name", init=session['image'].distro)
+ title="Image Name", init=ostype if distro == "unknown" else distro)
descr = WizardInputPage(
"ImageDescription", "Image Description",
#Sysprep
image.mount(False)
+ err_msg = "Unable to execute the system preparation tasks."
+ if not image.mounted:
+ raise FatalError("%s Couldn't mount the media." % err_msg)
+ elif image.mounted_ro:
+ raise FatalError("%s Couldn't mount the media read-write."
+ % err_msg)
image.os.do_sysprep()
metadata = image.os.meta
image.umount()