Skip to content

Commit f7a7498

Browse files
committed
re-add CancelledError exception handler case
This error is an Exception (not BaseException) in 3.7 and earlier.
1 parent 8a9cc1f commit f7a7498

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

redis/asyncio/connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,8 @@ async def connect(self):
705705
return
706706
try:
707707
await self._connect()
708+
except asyncio.CancelledError:
709+
raise # in 3.7 and earlier, this is an Exception, not BaseException
708710
except (socket.timeout, asyncio.TimeoutError):
709711
raise TimeoutError("Timeout connecting to server")
710712
except OSError as e:

0 commit comments

Comments
 (0)