mirror of
https://github.com/dockur/windows.git
synced 2026-07-28 21:53:34 +07:00
Update iso-prototype.py
This commit is contained in:
@@ -724,9 +724,12 @@ def build_pycdlib(args: argparse.Namespace) -> None:
|
||||
raise PrototypeError(f"Output already exists: {output}")
|
||||
|
||||
iso = pycdlib.PyCdlib()
|
||||
opened = False
|
||||
|
||||
try:
|
||||
print(f"Opening source ISO: {source}")
|
||||
iso.open(str(source))
|
||||
opened = True
|
||||
|
||||
include_bios, include_uefi = eltorito_platforms(source)
|
||||
print(
|
||||
@@ -763,7 +766,9 @@ def build_pycdlib(args: argparse.Namespace) -> None:
|
||||
print(f"Writing output ISO: {output}")
|
||||
iso.write(str(output))
|
||||
finally:
|
||||
iso.close()
|
||||
if opened:
|
||||
iso.close()
|
||||
print(f"Opening source ISO: {source}")
|
||||
|
||||
print(f"Created {output}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user