mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 11:24:06 +02:00
flashtool: can bridge uuid detection fix
Handle exceptions if the conversion from USB serial number to uuid fails for can bridge devices. Abort detection as the can bridge device cannot be flashed in one step. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
604b7e5a7d
commit
291c5da31a
@ -755,7 +755,15 @@ class CanSocket(BaseSocket):
|
||||
f"Found Klipper USB-CAN bridge on {can_intf}, serial {serial_no}"
|
||||
)
|
||||
if serial_no:
|
||||
det_uuid = convert_usbsn_to_uuid(serial_no)
|
||||
try:
|
||||
det_uuid = convert_usbsn_to_uuid(serial_no)
|
||||
except Exception:
|
||||
output_line(
|
||||
f"Failed to convert can bridge serial number {serial_no} "
|
||||
f"to a uuid for device {item.name}"
|
||||
)
|
||||
logging.exception("UUID conversion failed")
|
||||
return
|
||||
logging.info(
|
||||
f"Detected UUID: {det_uuid:x}, provided UUID: {self._uuid:x}"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user