From b21c545956db276cc1e3effbfae848dda88d11c5 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Tue, 3 Jun 2025 12:52:44 +0200 Subject: [PATCH] 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 --- pmb/helpers/devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/helpers/devices.py b/pmb/helpers/devices.py index d5c54e78..68c29e6f 100644 --- a/pmb/helpers/devices.py +++ b/pmb/helpers/devices.py @@ -121,7 +121,7 @@ def list_codenames(vendor: str) -> list[DeviceEntry]: codename = os.path.basename(path).split("-", 1)[1] # Ensure we don't crash on unknown device categories. try: - category = get_device_category_by_apkbuild_path(path / "APKBUILD") + category = get_device_category_by_directory_path(path) except RuntimeError as exception: logging.warning("WARNING: %s: %s", codename, exception) continue