I have this try/except block in Python2 that does not run in Python3 due to the line except socket.error as (code, msg):
try:
(conn, (ip,port)) = tcpServer.accept()
except socket.error as (code, msg):
if code != errno.EINTR:
raise
else:
break
What is the equivalent in Python3? Is there a way that works in both Python versions?