diff --git a/Loaders b/Loaders index a838505..b39741a 160000 --- a/Loaders +++ b/Loaders @@ -1 +1 @@ -Subproject commit a83850577f32faaf4694cda8f00666e0d9d34654 +Subproject commit b39741a9b96160755b963819d52dfe589f7a3a62 diff --git a/edlclient/Library/firehose.py b/edlclient/Library/firehose.py index c9ab0f0..8f1e5d7 100755 --- a/edlclient/Library/firehose.py +++ b/edlclient/Library/firehose.py @@ -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 != "":