diff --git a/boot-qemu.py b/boot-qemu.py index 2b07c1b..eef5cd0 100755 --- a/boot-qemu.py +++ b/boot-qemu.py @@ -125,6 +125,9 @@ def _get_kernel_ver_tuple(self, decomp_prog): utils.check_cmd(decomp_prog) if decomp_prog in ('gzip', ): decomp_cmd = [decomp_prog, '-c', '-d', self.kernel] + else: + raise RuntimeError( + f"Unsupported decompression program ('{decomp_prog}')?") decomp = subprocess.run(decomp_cmd, capture_output=True, check=True) utils.check_cmd('strings') diff --git a/utils.py b/utils.py index 51d7419..6ca0846 100755 --- a/utils.py +++ b/utils.py @@ -212,6 +212,9 @@ def prepare_initrd(architecture, rootfs_format='cpio', gh_json_file=None): # Download the ramdisk if it is not already downloaded if not src.exists(): + # gh_json_rel cannot be unset when used here because the elif condition + # above is the same as this one, which causes the script to exit. + # pylint: disable-next=possibly-used-before-assignment download_initrd(gh_json_rel, src) # If it is already downloaded, check that it is up to date and download # an update only if necessary.