Skip to content

Commit

Permalink
boot-qemu.py: Fix check in _prepare_initrd()
Browse files Browse the repository at this point in the history
This should have been checking the existence of the file. This makes a
future diff make a little more sense.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
nathanchance committed May 31, 2023
1 parent 8583db5 commit 858d555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boot-qemu.py
Expand Up @@ -164,7 +164,7 @@ def _prepare_initrd(self):
if not self._initrd_arch:
raise RuntimeError('No initrd architecture specified?')
if not (src := Path(BOOT_UTILS, 'images', self._initrd_arch,
'rootfs.cpio.zst')):
'rootfs.cpio.zst')).exists():
raise FileNotFoundError(f"initrd ('{src}') does not exist?")

(dst := src.with_suffix('')).unlink(missing_ok=True)
Expand Down

0 comments on commit 858d555

Please sign in to comment.