Skip to content

Commit

Permalink
Remove unless local variable in _connect_resolve_host (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 18, 2023
1 parent 9552aea commit f31b250
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions aioesphomeapi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,12 @@ def _remove_on_stop_task(self, _fut: asyncio.Future[None]) -> None:
async def _connect_resolve_host(self) -> hr.AddrInfo:
"""Step 1 in connect process: resolve the address."""
try:
coro = hr.async_resolve_host(
self._params.address,
self._params.port,
self._params.zeroconf_instance,
)
async with asyncio_timeout(RESOLVE_TIMEOUT):
return await coro
return await hr.async_resolve_host(
self._params.address,
self._params.port,
self._params.zeroconf_instance,
)
except asyncio_TimeoutError as err:
raise ResolveAPIError(
f"Timeout while resolving IP address for {self.log_name}"
Expand Down

0 comments on commit f31b250

Please sign in to comment.