diff options
| author | user <user@clank> | 2026-07-12 15:37:31 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-12 15:37:31 +0200 |
| commit | 6b744031b24cc0d8257b1365c3197c9cf0252be9 (patch) | |
| tree | 321a6a8c6c01cba3a21934d429ed45b693f0cbe9 /idatui/rpc.py | |
| parent | TODO: opcodes in disas view done (diff) | |
| download | ida-tui-6b744031b24cc0d8257b1365c3197c9cf0252be9.tar.gz ida-tui-6b744031b24cc0d8257b1365c3197c9cf0252be9.tar.xz ida-tui-6b744031b24cc0d8257b1365c3197c9cf0252be9.zip | |
pane: reap leaked idalib workers; drive: friendlier name resolution (fixes spawn-hang + bare KeyError)
Diffstat (limited to 'idatui/rpc.py')
| -rw-r--r-- | idatui/rpc.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/idatui/rpc.py b/idatui/rpc.py index f41c734..e363ba3 100644 --- a/idatui/rpc.py +++ b/idatui/rpc.py @@ -438,7 +438,13 @@ class RpcServer: result = await self._dispatch(method, params) return {"id": rid, "result": result} except Exception as e: # noqa: BLE001 — report, never kill the connection - return {"id": rid, "error": {"message": f"{type(e).__name__}: {e}"}} + # ``str(KeyError("msg"))`` returns ``repr("msg")`` (adds quotes), which + # mangles our friendly resolve messages; unwrap the single arg instead. + if isinstance(e, KeyError) and len(e.args) == 1 and isinstance(e.args[0], str): + msg = e.args[0] + else: + msg = str(e) + return {"id": rid, "error": {"message": f"{type(e).__name__}: {msg}"}} # -- composed helpers (semantic verbs) -------------------------------- # async def _press(self, keys, pred=None, timeout=20.0): |
