parse: deviceinfo: default flash_method (MR 2252)

Not sure if we should allow flash_method to be unset, but eh, simplify
usage by adding the none fallback here.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-08 01:46:00 +02:00 committed by Oliver Smith
parent d8d55c3e52
commit 0a73bc298b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -115,7 +115,7 @@ class Deviceinfo:
append_dtb: Optional[str] = ""
# bootloader
flash_method: Optional[str] = ""
flash_method: str = ""
boot_filesystem: Optional[str] = ""
# flash
@ -265,3 +265,6 @@ class Deviceinfo:
# if key not in Deviceinfo.__annotations__.keys():
# logging.warning(f"deviceinfo: {key} is not a known attribute")
setattr(self, key, value)
if not self.flash_method:
self.flash_method = "none"