Skip to content

Commit

Permalink
testing to see if when a serial error is reported(due to disconnectio…
Browse files Browse the repository at this point in the history
…n) if calling the close serial function, quickly resolves the problem
  • Loading branch information
mark11778 committed Feb 12, 2025
1 parent e61c615 commit 8172243
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion instrumentctl/G9SP_interlock/g9_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ def _read_response(self):

return data

except serial.SerialException as e:
except (serial.SerialException, OSError) as e:
self.log("Serial Error when reading G9 response", LogLevel.ERROR)
self._close_serial()
raise e

def _process_response(self, data):
Expand Down

0 comments on commit 8172243

Please sign in to comment.