In Python, how can find out if the port I'm trying to use for my gRPC server is already in use? I need to add the port before starting the server, but if I add a port already in use, it starts without any errors.
I'm running Python 2.7 on CentOS 7.
It doesn't seem to drop any errors.With the current version, can I do something like?result = sever.add_secure_port(...)if result == 0:raise PortInUseError()