Skip to content

Commit 39c298e

Browse files
committed
Use shortened checksum hash in FirmwareUpdateJob __str__
1 parent fd56f1c commit 39c298e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mqterm/jobs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ def __init__(self, *args, **kwargs):
172172
self.partition = Partition(Partition.RUNNING).get_next_update()
173173
self.logger = kwargs.get("logger", logging.getLogger("ota"))
174174

175+
def __str__(self):
176+
# Use shortened checksum in string representation
177+
return f"Job for {self.client_id}: {self.cmd} {' '.join(self.checksum[:8])}"
178+
175179
async def update(self, payload, seq):
176180
"""Write the payload to the firmware file and close if finished."""
177181
await super().update(payload, seq)

0 commit comments

Comments
 (0)