forked from Mirror/pmbootstrap
pmb.helpers.devices: Use get_device_category_by_directory_path()
Simplifies the code slightly. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2616
This commit is contained in:
parent
89a80265de
commit
b21c545956
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ def list_codenames(vendor: str) -> list[DeviceEntry]:
|
||||||
codename = os.path.basename(path).split("-", 1)[1]
|
codename = os.path.basename(path).split("-", 1)[1]
|
||||||
# Ensure we don't crash on unknown device categories.
|
# Ensure we don't crash on unknown device categories.
|
||||||
try:
|
try:
|
||||||
category = get_device_category_by_apkbuild_path(path / "APKBUILD")
|
category = get_device_category_by_directory_path(path)
|
||||||
except RuntimeError as exception:
|
except RuntimeError as exception:
|
||||||
logging.warning("WARNING: %s: %s", codename, exception)
|
logging.warning("WARNING: %s: %s", codename, exception)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue