mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Use builtin TimeoutError [core + helpers] (#109684)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user