Prevent the zeroconf service browser from terminating when a device without any addresses is discovered. (#38094)

This commit is contained in:
J. Nick Koston authored and Franck Nijhof committed 2020-07-24 21:53:40 +02:00
1 parent 7ad75493ff
commit 3e7ada2056
2 files changed
+31

No files matched your search

@@ -209,6 +209,11 @@ def setup(hass, config):
return
info = info_from_service(service_info)
if not info:
# Prevent the browser thread from collapsing
_LOGGER.debug("Failed to get addresses for device %s", name)
return
_LOGGER.debug("Discovered new device %s %s", name, info)
# If we can handle it as a HomeKit discovery, we do that here.
@@ -310,6 +315,9 @@ def info_from_service(service):
except UnicodeDecodeError:
pass
if not service.addresses:
return None
address = service.addresses[0]
info = {