From 28e1d94ab9f8ac3e940504268ac32e6e5331b1c6 Mon Sep 17 00:00:00 2001 From: Josiah Baldwin Date: Tue, 1 Apr 2025 12:06:41 -0700 Subject: [PATCH] Fixed weird issues in device_open_url --- src/meshctrl/session.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshctrl/session.py b/src/meshctrl/session.py index 9cddf16..52d2a51 100644 --- a/src/meshctrl/session.py +++ b/src/meshctrl/session.py @@ -1741,10 +1741,11 @@ class Session(object): tasks.append(tg.create_task(asyncio.wait_for(_(), timeout=timeout))) tasks.append({ "action": 'msg', "type": 'openUrl', "nodeid": nodeid, "url": url }, "device_open_url", timeout=timeout) + + success = tasks[0].result() res = tasks[1].result() - success = tasks[2].result() - if data.get("result", "ok").lower() != "ok": + if res.get("result", "ok").lower() != "ok": raise exceptions.ServerError(data["result"]) if not success: