From 4447f6801836bc0b944e048fb1804ecbc549b747 Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Sun, 16 Feb 2020 18:02:45 -0500 Subject: [PATCH] Revert "fix unhadled exception on scan timeout (#5)" This reverts commit 49fb8c76e7f96641effa9a2ab3a6d6e5376d650c. --- custom_components/zha_map/neighbour.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/custom_components/zha_map/neighbour.py b/custom_components/zha_map/neighbour.py index fdc7692..c9fefcc 100644 --- a/custom_components/zha_map/neighbour.py +++ b/custom_components/zha_map/neighbour.py @@ -119,17 +119,13 @@ async def scan(self): """Scan for neighbours.""" idx = 0 while True: - try: - status, val = await self.device.zdo.request( - zdo_t.ZDOCmd.Mgmt_Lqi_req, idx, tries=3, delay=1 - ) - self.debug("neighbor request Status: %s. Response: %r", status, val) - if zdo_t.Status.SUCCESS != status: - self.supported = False - self.debug("device does not support 'Mgmt_Lqi_req'") - return - except asyncio.TimeoutError: - self.debug("'Mgmt_Lqi_req' timedout") + status, val = await self.device.zdo.request( + zdo_t.ZDOCmd.Mgmt_Lqi_req, idx, tries=3, delay=1 + ) + self.debug("neighbor request Status: %s. Response: %r", status, val) + if zdo_t.Status.SUCCESS != status: + self.supported = False + self.debug("device does not support 'Mgmt_Lqi_req'") return neighbors = val.NeighborTableList