added exception for lost connection
This commit is contained in:
parent
9e1ce9b512
commit
409a9980bd
|
@ -1,6 +1,4 @@
|
||||||
import socket
|
import socket
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
class Robot:
|
class Robot:
|
||||||
def __init__(self, marker_id, ip):
|
def __init__(self, marker_id, ip):
|
||||||
|
@ -34,4 +32,6 @@ class Robot:
|
||||||
except BrokenPipeError:
|
except BrokenPipeError:
|
||||||
print(f"error: connection to robot {self.id} with ip {self.ip} lost")
|
print(f"error: connection to robot {self.id} with ip {self.ip} lost")
|
||||||
pass
|
pass
|
||||||
|
except ConnectionResetError:
|
||||||
|
print(f"error: connection to robot {self.id} with ip {self.ip} lost")
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user