forked from Mirror/pmbootstrap
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:
parent
b51d31acab
commit
97bd8b96ec
27 changed files with 372 additions and 288 deletions
|
@ -20,7 +20,7 @@ def create_zip(args: PmbArgs, chroot: Chroot, device: str):
|
|||
rootfs = "/mnt/rootfs_" + device
|
||||
flavor = pmb.helpers.frontend._parse_flavor(device)
|
||||
deviceinfo = pmb.parse.deviceinfo()
|
||||
method = deviceinfo["flash_method"]
|
||||
method = deviceinfo.flash_method
|
||||
fvars = pmb.flasher.variables(args, flavor, method)
|
||||
|
||||
# Install recovery installer package in buildroot
|
||||
|
@ -30,7 +30,7 @@ def create_zip(args: PmbArgs, chroot: Chroot, device: str):
|
|||
logging.info(f"({chroot}) create recovery zip")
|
||||
|
||||
for key in fvars:
|
||||
pmb.flasher.check_partition_blacklist(args, deviceinfo, key, fvars[key])
|
||||
pmb.flasher.check_partition_blacklist(deviceinfo, key, fvars[key])
|
||||
|
||||
# Create config file for the recovery installer
|
||||
options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue