From 098472c46d682186866ef552362d1049a53baddf Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Wed, 7 Aug 2024 09:38:07 +0900 Subject: [PATCH] scripts: sd_fusing: Check the raw_binary_table attribute If there is no raw_binary_table, it doesn't work fine with below message. RPI4/VF2 don't have raw_binary_table attribute. AttributeError: 'Rpi4' object has no attribute 'raw_binary_table' Change-Id: I379a87d9731fe82a3a32f54b38eb533b1ca4f885 Signed-off-by: Jaehoon Chung --- scripts/tizen/sd_fusing.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index ba05029f0f..a40cbb7ed8 100755 --- a/scripts/tizen/sd_fusing.py +++ b/scripts/tizen/sd_fusing.py @@ -15,7 +15,7 @@ import sys import tarfile import tempfile -__version__ = "1.1.8" +__version__ = "1.1.9" Format = False Device = "" @@ -176,10 +176,13 @@ class SdFusingTarget: return [self.binaries.get(binary, None)] def get_raw_binary_sector(self, binary): - for entry in self.raw_binary_table: - if entry['binaries'] == binary: - return entry['start_sector']; - return None + if hasattr(self, "raw_binary_table"): + for entry in self.raw_binary_table: + if entry['binaries'] == binary: + return entry['start_sector']; + return None + else: + return None def ensure_parttable(self): logging.notice(f"Verifying that partition table on {Device} matches target specification") -- 2.34.1