mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-09-27 04:22:46 +02: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:
|
async def _connect_resolve_host(self) -> hr.AddrInfo:
|
||||||
"""Step 1 in connect process: resolve the address."""
|
"""Step 1 in connect process: resolve the address."""
|
||||||
try:
|
try:
|
||||||
coro = hr.async_resolve_host(
|
|
||||||
self._params.address,
|
|
||||||
self._params.port,
|
|
||||||
self._params.zeroconf_instance,
|
|
||||||
)
|
|
||||||
async with asyncio_timeout(RESOLVE_TIMEOUT):
|
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:
|
except asyncio_TimeoutError as err:
|
||||||
raise ResolveAPIError(
|
raise ResolveAPIError(
|
||||||
f"Timeout while resolving IP address for {self.log_name}"
|
f"Timeout while resolving IP address for {self.log_name}"
|
||||||
|
Loading…
Reference in New Issue
Block a user