From c3fc19353bb8c3e498f51ef1b91a20b6e16afd0b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen <paulus@paulusschoutsen.nl> Date: Wed, 25 Mar 2015 22:50:20 -0700 Subject: [PATCH] Fix device tracker waiting forever when platform gets stuck --- homeassistant/components/device_tracker/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index ac0c8d483ff..6d4db7ad7ed 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -157,7 +157,8 @@ class DeviceTracker(object): def update_devices(self, now): """ Update device states based on the found devices. """ - self.lock.acquire() + if not self.lock.acquire(False): + return found_devices = set(dev.upper() for dev in self.device_scanner.scan_devices()) -- GitLab