Fix device tracker waiting forever when platform gets stuck

This commit is contained in:
Paulus Schoutsen 2015-03-25 22:50:20 -07:00
parent ec557f8d44
commit c3fc19353b

View File

@ -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())