File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -502,8 +502,6 @@ async def read_from_socket(
502502 # data was read from the socket and added to the buffer.
503503 # return True to indicate that data was read.
504504 return True
505- except asyncio .CancelledError :
506- raise
507505 except (socket .timeout , asyncio .TimeoutError ):
508506 if raise_on_timeout :
509507 raise TimeoutError ("Timeout reading from socket" ) from None
@@ -721,7 +719,7 @@ async def connect(self):
721719 lambda : self ._connect (), lambda error : self .disconnect ()
722720 )
723721 except asyncio .CancelledError :
724- raise
722+ raise # in 3.7 and earlier, this is an Exception, not BaseException
725723 except (socket .timeout , asyncio .TimeoutError ):
726724 raise TimeoutError ("Timeout connecting to server" )
727725 except OSError as e :
Original file line number Diff line number Diff line change @@ -917,7 +917,7 @@ async def loop_step_listen(self):
917917 except asyncio .TimeoutError :
918918 return False
919919
920-
920+
921921@pytest .mark .onlynoncluster
922922class TestBaseException :
923923 @pytest .mark .skipif (
You can’t perform that action at this time.
0 commit comments