Skip to content

Commit

Permalink
Remove redundant checks for asyncio.CancelledError
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed Aug 24, 2022
1 parent 843148f commit 918d104
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ async def read_from_socket(
# data was read from the socket and added to the buffer.
# return True to indicate that data was read.
return True
except asyncio.CancelledError:
raise
except (socket.timeout, asyncio.TimeoutError):
if raise_on_timeout:
raise TimeoutError("Timeout reading from socket") from None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_asyncio/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ async def loop_step_listen(self):
except asyncio.TimeoutError:
return False


@pytest.mark.onlynoncluster
class TestBaseException:
@pytest.mark.skipif(
Expand Down

0 comments on commit 918d104

Please sign in to comment.