forked from Mirror/pmbootstrap
helpers: package: fix potential null access in check_arch() (MR 2252)
pmaports.get() can return None usually, but check_arch() has no handling for it. Set must_exist=True so we properly error out in this case. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
84bced2110
commit
807424ee2b
1 changed files with 1 additions and 1 deletions
|
@ -158,5 +158,5 @@ def check_arch(pkgname, arch, binary=True):
|
|||
if binary:
|
||||
arches = get(pkgname, arch)["arch"]
|
||||
else:
|
||||
arches = pmb.helpers.pmaports.get(pkgname)["arch"]
|
||||
arches = pmb.helpers.pmaports.get(pkgname, must_exist=True)["arch"]
|
||||
return pmb.helpers.pmaports.check_arches(arches, arch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue