mirror of
https://github.com/espressif/esptool.git
synced 2025-10-19 20:13:00 +08:00
fix(intelhex): catch unicode decode errors when convering hex to binary
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user