Skip to content

Commit

Permalink
Remove except asyncio.CancelledError which is no longer necessary due…
Browse files Browse the repository at this point in the history
… to 53d7025 (#5473)

* Remove `except asyncio.CancelledError` which is no longer necessary due to 53d7025

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
whitphx and gradio-pr-bot committed Sep 11, 2023
1 parent 041560f commit b271e73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/deep-socks-rule.md
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Remove except asyncio.CancelledError which is no longer necessary due to 53d7025
5 changes: 0 additions & 5 deletions gradio/queueing.py
Expand Up @@ -391,11 +391,6 @@ async def call_prediction(self, events: list[Event], batch: bool):
gr_request=gr_request,
fn_index_inferred=fn_index_inferred,
)
except asyncio.CancelledError:
# `asyncio.CancelledError` can be raised in a normal case and we don't want to show it to the user,
# so we catch it here before the `BaseException` handler that prints the traceback.
# Ref: https://github.com/gradio-app/gradio/pull/5165#discussion_r1310497840
raise
except Exception as error:
show_error = app.get_blocks().show_error or isinstance(error, Error)
traceback.print_exc()
Expand Down

0 comments on commit b271e73

Please sign in to comment.