mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-21 11:55:11 +01:00
Remove unless local variable in _connect_resolve_host (#588)
This commit is contained in:
parent
9552aea1f7
commit
f31b250fe2
@ -277,13 +277,12 @@ class APIConnection:
|
||||
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}"
|
||||
|
Loading…
Reference in New Issue
Block a user