Skip to content

Commit

Permalink
Fix typing: Missing path was not considered
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Apr 9, 2024
1 parent d386374 commit f1fd306
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/aleph/vm/controllers/qemu/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ async def download_all(self) -> None:

async def make_writable_volume(self, parent_image_path, volume: Union[PersistentVolume, RootfsVolume]):
"""Create a new qcow2 image file based on the passed one, that we give to the VM to write onto"""
qemu_img_path = shutil.which("qemu-img")
qemu_img_path: Optional[str] = shutil.which("qemu-img")
if not qemu_img_path:
raise VmSetupError("qemu-img not found in PATH")

volume_name = volume.name if isinstance(volume, PersistentVolume) else "rootfs"

# detect the image format
Expand Down

0 comments on commit f1fd306

Please sign in to comment.