File tree 2 files changed +2
-4
lines changed
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(
502
502
# data was read from the socket and added to the buffer.
503
503
# return True to indicate that data was read.
504
504
return True
505
- except asyncio .CancelledError :
506
- raise
507
505
except (socket .timeout , asyncio .TimeoutError ):
508
506
if raise_on_timeout :
509
507
raise TimeoutError ("Timeout reading from socket" ) from None
@@ -722,7 +720,7 @@ async def connect(self):
722
720
lambda : self ._connect (), lambda error : self .disconnect ()
723
721
)
724
722
except asyncio .CancelledError :
725
- raise
723
+ raise # in 3.7 and earlier, this is an Exception, not BaseException
726
724
except (socket .timeout , asyncio .TimeoutError ):
727
725
raise TimeoutError ("Timeout connecting to server" )
728
726
except OSError as e :
Original file line number Diff line number Diff line change @@ -917,7 +917,7 @@ async def loop_step_listen(self):
917
917
except asyncio .TimeoutError :
918
918
return False
919
919
920
-
920
+
921
921
@pytest .mark .onlynoncluster
922
922
class TestBaseException :
923
923
@pytest .mark .skipif (
You can’t perform that action at this time.
0 commit comments