Open Stefanhg opened 1 year ago
Please provide some more specific examples as to what you are looking at. In Python, try/except is used for exception handling, and not all exceptions has to be so severe that the program needs to crash, thus it is handled more gracefully.
For instance, the get
method of queue.Queue
will raise an exception if it is empty. So it's better dealt with like this
while True:
try:
self._buffer_q.get(block=False)
except queue.Empty:
break
so the program isn't crashing just because the buffer doesn't have any data yet.
Hello, I have been doing some debugging of my own version of this package and found some problem with write timeout. In your package you have many try/except's wrapped around the functions. How come you have done this?