Skip to content

Commit

Permalink
Catch Queue.Full when setting thresholds on load
Browse files Browse the repository at this point in the history
  • Loading branch information
teejusb committed Jul 9, 2021
1 parent 0b40883 commit c4282b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webui/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ def Open(self):
for i, threshold in enumerate(self.profile_handler.GetCurThresholds()):
threshold_cmd = str(sensor_numbers[i]) + str(threshold) + '\n'
self.write_queue.put(threshold_cmd, block=False)

except Exception as e:
except queue.Full as e:
logger.error('Could not set thresholds. Queue full.')
except serial.SerialException as e:
self.ser = None
logger.exception('Error opening serial: %s', e)

Expand Down

0 comments on commit c4282b9

Please sign in to comment.