Skip to content

Commit dea5f78

Browse files
committed
Revert "Add more exception logging, fix some additional stream read/write issues"
This reverts commit f15a0bd.
1 parent f15a0bd commit dea5f78

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

meshtastic/stream_interface.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _disconnected(self) -> None:
104104

105105
def _writeBytes(self, b: bytes) -> None:
106106
"""Write an array of bytes to our stream and flush"""
107-
if self.stream and self.stream is not None and getattr(self.stream, "is_open", False): # ignore writes when stream is closed
107+
if self.stream: # ignore writes when stream is closed
108108
self.stream.write(b)
109109
self.stream.flush()
110110
# win11 might need a bit more time, too
@@ -116,7 +116,7 @@ def _writeBytes(self, b: bytes) -> None:
116116

117117
def _readBytes(self, length) -> Optional[bytes]:
118118
"""Read an array of bytes from our stream"""
119-
if self.stream and self.stream is not None and getattr(self.stream, "is_open", False):
119+
if self.stream:
120120
return self.stream.read(length)
121121
else:
122122
return None
@@ -226,12 +226,10 @@ def __reader(self) -> None:
226226
logger.error(
227227
f"Unexpected OSError, terminating meshtastic reader... {ex}"
228228
)
229-
traceback.print_exc()
230229
except Exception as ex:
231230
logger.error(
232231
f"Unexpected exception, terminating meshtastic reader... {ex}"
233232
)
234-
traceback.print_exc()
235233
finally:
236234
logger.debug("reader is exiting")
237235
self._disconnected()

0 commit comments

Comments
 (0)