File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,6 @@ async def read_from_socket(
491
491
# data was read from the socket and added to the buffer.
492
492
# return True to indicate that data was read.
493
493
return True
494
- except asyncio .CancelledError :
495
- raise
496
494
except (socket .timeout , asyncio .TimeoutError ):
497
495
if raise_on_timeout :
498
496
raise TimeoutError ("Timeout reading from socket" ) from None
@@ -711,7 +709,7 @@ async def connect(self):
711
709
lambda : self ._connect (), lambda error : self .disconnect ()
712
710
)
713
711
except asyncio .CancelledError :
714
- raise
712
+ raise # in 3.7 and earlier, this is an Exception, not BaseException
715
713
except (socket .timeout , asyncio .TimeoutError ):
716
714
raise TimeoutError ("Timeout connecting to server" )
717
715
except OSError as e :
You can’t perform that action at this time.
0 commit comments