Skip to content

Commit 33b765f

Browse files
authored
fix: 'result' referenced before assignment (#159)
1 parent 8a9f535 commit 33b765f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundled/tool/lsp_jsonrpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def run_over_json_rpc(
243243
"", f"Invalid result for request: {json.dumps(msg, indent=4)}"
244244
)
245245

246+
result = data["result"] if "result" in data else ""
246247
if "error" in data:
247-
result = data["result"] if "result" in data else ""
248248
error = data["error"]
249249

250250
if data.get("exception", False):

0 commit comments

Comments
 (0)