mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +03:00
pmb.parse.kconfig.check: fix crash when trying to flash Alpine kernels
This fixes a bug when trying to flash an Alpine kernel. The aport doesn't exist in pmaports when `flasher/frontend.py` calls `pmb.parse.kconfig.check`: File "/home/a/pmbootstrap/pmb/commands/flasher.py", line 43, in run kernel( File "/home/a/pmbootstrap/pmb/flasher/frontend.py", line 38, in kernel pmb.parse.kconfig.check(flavor, must_exist=False) File "/home/a/pmbootstrap/pmb/parse/kconfig.py", line 262, in check apkbuild = pmb.parse.apkbuild(aport / "APKBUILD") ~~~~~~^~~~~~~~~~~~ TypeError: unsupported operand type(s) for /: 'NoneType' and 'str'
This commit is contained in:
parent
aebf99e988
commit
6a2c7d4345
1 changed files with 5 additions and 0 deletions
|
@ -259,6 +259,11 @@ def check(
|
|||
if must_exist:
|
||||
raise e
|
||||
return None
|
||||
# No exception is thrown if the aport isn't found and must_exit=False,
|
||||
# so just return
|
||||
if aport is None and not must_exist:
|
||||
return None
|
||||
|
||||
apkbuild = pmb.parse.apkbuild(aport / "APKBUILD")
|
||||
pkgver = apkbuild["pkgver"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue