Update telnetlib from CPython 3.10
@@ -16,7 +16,7 @@ def server(evt, serv):
try:
conn, addr = serv.accept()
conn.close()
- except socket.timeout:
+ except TimeoutError:
pass
finally:
serv.close()
@@ -29,7 +29,7 @@ class GeneralTests(unittest.TestCase):
self.sock.settimeout(60) # Safety net. Look issue 11812
self.port = socket_helper.bind_port(self.sock)
self.thread = threading.Thread(target=server, args=(self.evt,self.sock))
- self.thread.setDaemon(True)
+ self.thread.daemon = True
self.thread.start()
self.evt.wait()
