From dea5f788a271626b7e8a95027c968b48f278eed2 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Thu, 13 Nov 2025 12:07:32 -0700 Subject: [PATCH] Revert "Add more exception logging, fix some additional stream read/write issues" This reverts commit f15a0bdc0bd3d847b24f852f35efc6541f4a5d42. --- meshtastic/stream_interface.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meshtastic/stream_interface.py b/meshtastic/stream_interface.py index dc4109e..82b6ab5 100644 --- a/meshtastic/stream_interface.py +++ b/meshtastic/stream_interface.py @@ -104,7 +104,7 @@ class StreamInterface(MeshInterface): def _writeBytes(self, b: bytes) -> None: """Write an array of bytes to our stream and flush""" - if self.stream and self.stream is not None and getattr(self.stream, "is_open", False): # ignore writes when stream is closed + if self.stream: # ignore writes when stream is closed self.stream.write(b) self.stream.flush() # win11 might need a bit more time, too @@ -116,7 +116,7 @@ class StreamInterface(MeshInterface): def _readBytes(self, length) -> Optional[bytes]: """Read an array of bytes from our stream""" - if self.stream and self.stream is not None and getattr(self.stream, "is_open", False): + if self.stream: return self.stream.read(length) else: return None @@ -226,12 +226,10 @@ class StreamInterface(MeshInterface): logger.error( f"Unexpected OSError, terminating meshtastic reader... {ex}" ) - traceback.print_exc() except Exception as ex: logger.error( f"Unexpected exception, terminating meshtastic reader... {ex}" ) - traceback.print_exc() finally: logger.debug("reader is exiting") self._disconnected()