From 7dc84e38696646ff787e358976bad9e9d7b6aed6 Mon Sep 17 00:00:00 2001 From: jadon <16850875+wolffshots@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:52:51 +0200 Subject: [PATCH] chore: replace timeout with asyncio --- custom_components/audiobookshelf/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/audiobookshelf/api.py b/custom_components/audiobookshelf/api.py index ba7addd..2647f73 100644 --- a/custom_components/audiobookshelf/api.py +++ b/custom_components/audiobookshelf/api.py @@ -4,7 +4,6 @@ import socket import aiohttp -import async_timeout TIMEOUT = 10 @@ -69,7 +68,7 @@ async def api_wrapper( else: headers = {"Authorization": f"Bearer {self._access_token}"} try: - async with async_timeout.timeout(TIMEOUT): # loop=asyncio.get_event_loop() + async with asyncio.timeout(TIMEOUT): # loop=asyncio.get_event_loop() if method == "get": response = await self._session.get(url, headers=headers) if response.status >= 200 and response.status < 300: