Skip to content

Commit

Permalink
fix(intelhex): catch unicode decode errors when convering hex to binary
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdragun committed Feb 22, 2024
1 parent 3301d0f commit a2bdaa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esptool/bin_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a2bdaa2

Please sign in to comment.