From fc44b64233c4afa049b9e373ee6b9281e1c30674 Mon Sep 17 00:00:00 2001 From: Newbyte <newbyte@postmarketos.org> Date: Tue, 29 Oct 2024 21:06:25 +0100 Subject: [PATCH] pmb.flasher.init: Assert that depends is a list (MR 2464) pmaports_cfg.get() can return other types, too. As such, we need to assert that it's a list to appease mypy. --- pmb/flasher/init.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmb/flasher/init.py b/pmb/flasher/init.py index de92b2d81..87b028f9f 100644 --- a/pmb/flasher/init.py +++ b/pmb/flasher/init.py @@ -36,6 +36,9 @@ def install_depends(method: str) -> None: "," ) + if not isinstance(depends, list): + raise RuntimeError(f"depends was {type(depends)}, not a list") + pmb.chroot.apk.install(depends, Chroot.native()) -- GitLab