Bugfix async blocking loop with xml parser. (#5694)
This commit is contained in:
parent
32f8622bba
commit
a72d32b9af
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue