Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier committed Feb 1, 2024
1 parent 1ff4298 commit 2aaec3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/dispatch/coroutine.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ def __init__(self, req: coroutine_pb2.ExecuteRequest):
input_pb = google.protobuf.wrappers_pb2.BytesValue()
req.input.Unpack(input_pb)
input_bytes = input_pb.value
if len(input_bytes) > 0:
self._input = pickle.loads(input_bytes)
else:
self._input = None
self._input = pickle.loads(input_bytes)
else:
state_bytes = req.poll_response.state
if len(state_bytes) > 0:
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def execute(request: fastapi.Request):
try:
output = coroutine(coro_input)
except Exception as ex:
# TODO: distinguish unaught exceptions from exceptions returned by
# TODO: distinguish uncaught exceptions from exceptions returned by
# coroutine?
err = dispatch.coroutine.Error.from_exception(ex)
output = dispatch.coroutine.Output.error(err)
Expand Down

0 comments on commit 2aaec3f

Please sign in to comment.