fix(intelhex): catch unicode decode errors when convering hex to binary

This commit is contained in:
Peter Dragun
2024-02-22 09:08:02 +01:00
parent 3301d0ff46
commit a2bdaa258d

View File

@@ -57,7 +57,7 @@ def intel_hex_to_bin(file: BinaryIO, start_addr: Optional[int] = None) -> Binary
return bin
else:
return file
except HexRecordError:
except (HexRecordError, UnicodeDecodeError):
# file started with HEX magic but the rest was not according to the standard
return file