Use builtin TimeoutError [core + helpers] (#109684)
This commit is contained in:
parent
a9147cf3dd
commit
cd0ee98dba
19 changed files with 70 additions and 74 deletions
|
@ -179,7 +179,7 @@ class _GlobalTaskContext:
|
|||
|
||||
# Timeout on exit
|
||||
if exc_type is asyncio.CancelledError and self.state == _State.TIMEOUT:
|
||||
raise asyncio.TimeoutError
|
||||
raise TimeoutError
|
||||
|
||||
self._state = _State.EXIT
|
||||
self._wait_zone.set()
|
||||
|
@ -294,7 +294,7 @@ class _ZoneTaskContext:
|
|||
|
||||
# Timeout on exit
|
||||
if exc_type is asyncio.CancelledError and self.state == _State.TIMEOUT:
|
||||
raise asyncio.TimeoutError
|
||||
raise TimeoutError
|
||||
|
||||
self._state = _State.EXIT
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue