diff options
| author | blasty <peter@haxx.in> | 2026-07-12 15:37:31 +0200 |
|---|---|---|
| committer | blasty <peter@haxx.in> | 2026-07-12 15:37:31 +0200 |
| commit | 920dd133b61472e8669b60909a27aceec7bf70a5 (patch) | |
| tree | 3f65756aa718280a8d14ac6e96ea40af265f3168 /idatui/rpc.py | |
| parent | TODO: opcodes in disas view done (diff) | |
| download | ida-tui-920dd133b61472e8669b60909a27aceec7bf70a5.tar.gz ida-tui-920dd133b61472e8669b60909a27aceec7bf70a5.tar.xz ida-tui-920dd133b61472e8669b60909a27aceec7bf70a5.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): |
