Merge branch 'master' into 1

This commit is contained in:
Neko-609 2024-07-29 10:13:08 +08:00 committed by GitHub
commit 2086ad7cf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 3 deletions
Loaders
edlclient/Library

@ -1 +1 @@
Subproject commit a83850577f32faaf4694cda8f00666e0d9d34654
Subproject commit b39741a9b96160755b963819d52dfe589f7a3a62

View file

@ -10,6 +10,10 @@ import binascii
import json
import os.path
import platform
import re
import time
import json
from struct import unpack
from binascii import hexlify
from queue import Queue
from threading import Thread
@ -1147,8 +1151,17 @@ class firehose(metaclass=LogBase):
self.serial = int(serial, 16)
except Exception as err: # pylint: disable=broad-except
self.debug(str(err))
serial = line.split(": ")[2]
self.serial = int(serial.split(" ")[0])
try:
serial = line.split(": ")[2]
self.serial = int(serial.split(" ")[0])
except Exception as err1:
self.debug(str(err1))
try:
# Firehose return format: "Chip serial num (0x%lx) Chip ID (0x%x)"
serial_re = re.findall("Chip serial num \\(0x(.*?)\\)", line)
self.serial = int(serial_re[0], 16)
except Exception as err2:
self.error(err2)
if supfunc and "end of supported functions" not in line.lower():
rs = line.replace("\n", "")
if rs != "":