From a72d32b9af2359830c9c88980b34aff2a32c4e21 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 1 Feb 2017 17:20:52 +0100 Subject: [PATCH] Bugfix async blocking loop with xml parser. (#5694) --- homeassistant/components/device_tracker/upc_connect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/upc_connect.py b/homeassistant/components/device_tracker/upc_connect.py index a8d39baed57..ff526ec7e8a 100644 --- a/homeassistant/components/device_tracker/upc_connect.py +++ b/homeassistant/components/device_tracker/upc_connect.py @@ -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)