Skip to content

Commit 8dd8866

Browse files
committed
init: catch all exceptions during loop
This includes those that take place when the device goes away, like: > OSError: [Errno 113] Host is unreachable and > BrokenPipeError: [Errno 32] Broken pipe
1 parent d678274 commit 8dd8866

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def shutdown(event):
136136
try:
137137
_LOGGER.info("Starting device client loop")
138138
self.device_client.run(once=False)
139-
except (device.DeviceError, RecursionError, ConnectionError) as e:
139+
except Exception as e:
140140
_LOGGER.exception(f"Failed to read data: {str(e)}")
141141
self.device_client.close()
142142
self._fails += 1

0 commit comments

Comments
 (0)