diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9c360d48..1b03c620 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,9 @@ and this project adheres to `Semantic Versioning None: if callback: callback(bytearray(value)) - watcher = manager.add_device_watcher( - self._device_path, on_connected_changed, on_value_changed - ) - self._remove_device_watcher = lambda: manager.remove_device_watcher( - watcher - ) + try: + watcher = manager.add_device_watcher( + self._device_path, on_connected_changed, on_value_changed + ) + self._remove_device_watcher = lambda: manager.remove_device_watcher( + watcher + ) - self._disconnect_monitor_event = local_disconnect_monitor_event = ( - asyncio.Event() - ) + self._disconnect_monitor_event = local_disconnect_monitor_event = ( + asyncio.Event() + ) - try: try: # # The BlueZ backend does not disconnect devices when the