We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0322a5 commit 473e96bCopy full SHA for 473e96b
microscope/cameras/picamera.py
@@ -140,12 +140,12 @@ def HW_trigger(self, channel):
140
)
141
142
def _fetch_data(self):
143
- if self._queue.qsize() > 0:
144
- data = self._queue.get()
145
- _logger.info("Sending image")
146
- return data
147
- else:
+ try:
+ data = self._queue.get_nowait()
+ except queue.Empty:
148
return None
+ _logger.info("Sending image")
+ return data
149
150
def initialize(self):
151
"""Initialise the Pi Camera camera.
0 commit comments