mkksiso: Raise error if no volume id is found

It is possible the source iso doesn't have an id, or there is an errorr
reading it. Raise an error when this happens to make it more clear what
the problem is.

Related: rhbz#2028048
This commit is contained in:
Brian C. Lane 2021-12-07 10:52:02 -08:00
parent c7f22717a8
commit 86e492d680

View File

@ -396,6 +396,8 @@ class MakeKickstartISO():
try:
self.iso = IsoMountpoint(self.input_iso)
self.label = self.iso.label if volid is None else volid
if not self.label:
raise RuntimeError("No volume id found, cannot create iso.")
log.info("Volume Id = %s", self.label)
if os.path.exists(os.path.join(self.iso.mount_dir, "images/efiboot.img")):