added exception for lost connection

simple_control
Simon Pirkelmann 2020-10-24 20:01:16 +02:00
parent 9e1ce9b512
commit 409a9980bd
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,4 @@
import socket
import sys
class Robot:
def __init__(self, marker_id, ip):
@ -34,4 +32,6 @@ class Robot:
except BrokenPipeError:
print(f"error: connection to robot {self.id} with ip {self.ip} lost")
pass
except ConnectionResetError:
print(f"error: connection to robot {self.id} with ip {self.ip} lost")
pass