Remove redundant line

pull/18872/head
Richard Belleville 6 years ago
parent 1c65fd19e8
commit aec0860ebf
  1. 3
      examples/python/wait_for_ready/wait_for_ready_example.py

@ -35,10 +35,9 @@ _ONE_DAY_IN_SECONDS = 60 * 60 * 24
def get_free_loopback_tcp_port(): def get_free_loopback_tcp_port():
if socket.has_ipv6: if socket.has_ipv6:
tcp_socket = socket.socket(socket.AF_INET6) tcp_socket = socket.socket(socket.AF_INET6)
tcp_socket.bind(('', 0))
else: else:
tcp_socket = socket.socket(socket.AF_INET) tcp_socket = socket.socket(socket.AF_INET)
tcp_socket.bind(('', 0)) tcp_socket.bind(('', 0))
address_tuple = tcp_socket.getsockname() address_tuple = tcp_socket.getsockname()
yield "[::1]:%s" % (address_tuple[1]) yield "[::1]:%s" % (address_tuple[1])
tcp_socket.close() tcp_socket.close()

Loading…
Cancel
Save