Skip to content

Commit

Permalink
Merge pull request #115 from gaaf/patch-1 (Fixes #114)
Browse files Browse the repository at this point in the history
Use async on timeout and convert to asyncio.timeout
  • Loading branch information
zachcheatham authored Nov 7, 2024
2 parents 2453f72 + 3cc82c5 commit b8df116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/omada/api/controller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
import async_timeout
import asyncio

from dataclasses import dataclass
from asyncio.exceptions import TimeoutError
Expand Down Expand Up @@ -206,7 +206,7 @@ async def _request(self, method, url, params=None, json=None, private=False):
LOGGER.debug("Requesting: %s - Params: %s - JSON: %s - Headers %s", url, params, json, headers)

try:
with async_timeout.timeout(self._req_timeout):
async with asyncio.timeout(self._req_timeout):
async with self._session.request(
method,
url,
Expand Down

0 comments on commit b8df116

Please sign in to comment.