From 0a73bc298bca6ae90e03abd2d37b4657a5525c7e Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Sat, 8 Jun 2024 01:46:00 +0200 Subject: [PATCH] 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 --- pmb/parse/deviceinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pmb/parse/deviceinfo.py b/pmb/parse/deviceinfo.py index 651d734d..b9f9bc24 100644 --- a/pmb/parse/deviceinfo.py +++ b/pmb/parse/deviceinfo.py @@ -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"