Skip to content

Commit

Permalink
Catch JSON decode exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Jan 16, 2024
1 parent 89f687b commit 02848f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyflowlauncher/jsonrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ def send(self, data: Mapping) -> None:
def recieve(self) -> JsonRPCRequest:
try:
return json.loads(sys.argv[1])
except IndexError:
except (IndexError, json.JSONDecodeError):
return {'method': 'query', 'parameters': ['']}

0 comments on commit 02848f4

Please sign in to comment.