Skip to content

Commit

Permalink
Update bridge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
acagliano authored Apr 29, 2022
1 parent 4fa9866 commit e53ddbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ def ser_recv(ser_in, ser_out):
if debug_mode: print("C->S completed: ", status)
else:
sys.stderr.write('Error: Tried to send a packet without being connected to a server\n')
except (serial.SerialException, OSError):
except (serial.SerialException, OSError, IOError):
sys.stderr.write('Serial device appears disabled. Disconnecting from remote host\n')
connected = False
try:
s.close()
except NameError: pass
Expand Down

0 comments on commit e53ddbe

Please sign in to comment.