Fix missing totalsectors init

This commit is contained in:
Bjoern Kerler 2022-08-27 16:10:16 +02:00
parent b808386264
commit d3968de3b4
No known key found for this signature in database
GPG key ID: 52E823BB96A55380

View file

@ -48,6 +48,7 @@ class nand_partition:
self.partitiontblsector = None
self.parent = parent
self.storage_info = {}
self.totalsectors = None
def parse(self, partdata):
self.partentries = {}
@ -889,7 +890,7 @@ class firehose(metaclass=LogBase):
else:
self.error("Error on EDL Authentification")
return False
elif "MaxPayloadSizeToTargetInBytes" in line:
elif "MaxPayloadSizeToTargetInBytes" in rsp.data:
try:
self.cfg.MemoryName = rsp.data["MemoryName"]
self.cfg.MaxPayloadSizeToTargetInBytes = int(rsp.data["MaxPayloadSizeToTargetInBytes"])