mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 16:57:19 +00:00
Bugfix async blocking loop with xml parser. (#5694)
This commit is contained in:
parent
bc7fd5611e
commit
6ee7878236
@ -92,7 +92,8 @@ class UPCDeviceScanner(DeviceScanner):
|
||||
raw = yield from self._async_ws_function(CMD_DEVICES)
|
||||
|
||||
try:
|
||||
xml_root = ET.fromstring(raw)
|
||||
xml_root = yield from self.hass.loop.run_in_executor(
|
||||
None, ET.fromstring, raw)
|
||||
return [mac.text for mac in xml_root.iter('MACAddr')]
|
||||
except (ET.ParseError, TypeError):
|
||||
_LOGGER.warning("Can't read device from %s", self.host)
|
||||
|
Loading…
x
Reference in New Issue
Block a user