Skip to content

Commit

Permalink
Remove hacky StopAsyncIteration conversion that doesn't seem to trigger?
Browse files Browse the repository at this point in the history
  • Loading branch information
freider committed Oct 26, 2024
1 parent 08a89ce commit 4e7c7ce
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions modal/_utils/async_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,6 @@ def run_async_gen(
except KeyboardInterrupt as e:
raise e from None
except StopAsyncIteration:
if self._num_sigints > 0:
# TODO: untie this from _num_sigints if possible?
# the cancellation of `gen.asend` is converted into
# StopAsyncIteration, so we re-convert it here to KeyboardInterrupt
raise KeyboardInterrupt()
break # typically a graceful exit of the async generator
try:
next_send = yield next_yield
Expand Down

0 comments on commit 4e7c7ce

Please sign in to comment.