From 37dc273787321758ef333bf07a0627a9a9e55134 Mon Sep 17 00:00:00 2001 From: Cybis320 Date: Tue, 18 Aug 2026 20:23:59 +0000 Subject: [PATCH] upgrade(): log the response just read, not a stale variable The completion loop reads each response into `data` but logs `reply`, which was last assigned in the upload loop above and never changes afterwards. Every iteration therefore logs the same stale value instead of the upgrade progress the line is meant to record. Debug-level only, so it is not visible by default, but it makes the upgrade log actively misleading when someone does turn it on: the Ret values recorded can repeat or show a value the camera never sent at that point. Co-Authored-By: Claude Opus 5 (1M context) --- dvrip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvrip.py b/dvrip.py index 9eed5db..49eed3d 100644 --- a/dvrip.py +++ b/dvrip.py @@ -771,7 +771,7 @@ def upgrade(self, filename="", packetsize=0x8000, vprint=None): self.logger.debug("Starting upgrade...") while True: data, rcvd = self.recv_json(rcvd) - self.logger.debug(reply) + self.logger.debug(data) if data is None: vprint("\nDone") return