mirror of
https://github.com/espressif/esptool.git
synced 2025-10-21 15:10:33 +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
|
return bin
|
||||||
else:
|
else:
|
||||||
return file
|
return file
|
||||||
except HexRecordError:
|
except (HexRecordError, UnicodeDecodeError):
|
||||||
# file started with HEX magic but the rest was not according to the standard
|
# file started with HEX magic but the rest was not according to the standard
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user