Skip to content

Commit 56bd2b5

Browse files
committed
Fix checksum/sha comparison logic during OTA
1 parent 96bb5f3 commit 56bd2b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mqterm/jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _write_block(self, payload=None, payload_len=None):
234234

235235
def _validate_firmware(self):
236236
"""Validate the firmware file before finalizing the update."""
237-
hex_digest = hexlify(self.sha.digest())
237+
hex_digest = hexlify(self.sha.digest()).decode()
238238
if not hex_digest == self.checksum:
239239
raise ValueError(
240240
f"Checksum mismatch: expected {self.checksum}, got {hex_digest}"

0 commit comments

Comments
 (0)