ignore broad exception warning

This commit is contained in:
Feng Wang 2024-12-21 22:11:38 +08:00
parent 3f77738b90
commit 0872bf4f69

View File

@ -1341,8 +1341,9 @@ class MIoTLan:
try:
# Scan devices
self.ping(if_name=None, target_ip='255.255.255.255')
except Exception:
except Exception as err: # pylint: disable=broad-exception-caught
# Ignore any exceptions to avoid blocking the loop
_LOGGER.error('ping device error, %s', err)
pass
scan_time = self.__get_next_scan_time()
self._scan_timer = self._internal_loop.call_later(