From 51de58c2a7576dfcec5cbe4b5d261414c9ec7328 Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov Date: Tue, 1 Apr 2025 16:53:39 +0300 Subject: [PATCH] Print error code during login --- dvrip.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dvrip.py b/dvrip.py index 43bb70e..805720a 100644 --- a/dvrip.py +++ b/dvrip.py @@ -315,6 +315,8 @@ class DVRIPCam(object): }, ) if data is None or data["Ret"] not in self.OK_CODES: + if data["Ret"] in self.CODES: + print(f'[{data["Ret"]}] {self.CODES[data["Ret"]]}') return False self.session = int(data["SessionID"], 16) self.alive_time = data["AliveInterval"]