From ab39232cd1eda4664ce443ffad332ab8f7e80b60 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 17 Apr 2025 09:08:39 +0200 Subject: [PATCH] login response --- src/meshcore_cli/meshcore_cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index b0a5e86..b5f2637 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -570,12 +570,17 @@ async def next_cmd(mc, cmds, json_output=False): res = await mc.wait_for_event(EventType.LOGIN_SUCCESS) logger.debug(res) if res is None: - print("Timeout waiting login response") + print("Login failed : Timeout waiting response") elif json_output : if res.type == EventType.LOGIN_SUCCESS: print(json.dumps({"login_success" : True}, indent=4)) else: print(json.dumps({"login_success" : False}, indent=4)) + else: + if res.type == EventType.LOGIN_SUCCESS: + print("Login success") + else: + print("Login failed") case "wait_status" | "ws" : res = await mc.wait_for_event(EventType.STATUS_RESPONSE)