1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

parse: deviceinfo: make Deviceinfo a class (MR 2252)

Introduce a Deviceinfo class and use it rather than the dictionary. This
gives us sweet sweet autocomplete, and lays the foundation for having a
proper deviceinfo validator in the future.

Additionally, continue refactoring out args...

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-06 15:05:59 +02:00 committed by Oliver Smith
parent b51d31acab
commit 97bd8b96ec
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
27 changed files with 372 additions and 288 deletions

View file

@ -99,7 +99,7 @@ def init(args: PmbArgs) -> PmbArgs:
pmb.config.pmaports.read_config()
pmb.helpers.git.parse_channels_cfg(config.aports)
deviceinfo = pmb.parse.deviceinfo()
context.device_arch = deviceinfo["arch"]
context.device_arch = deviceinfo.arch
# Remove attributes from args so they don't get used by mistake
delattr(args, "timeout")