From 6a883ec0448f4c88a9156a59c260a2476ce78966 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 18 May 2020 11:26:20 -0500 Subject: [PATCH] Swap gethostbyname for getaddrinfo gethostbyname doesn't support ipv6, so replace it with getaddrinfo. The new func also requires a port, but for our purposes it doesn't matter which one, so just added 443. --- guided_docker_compose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guided_docker_compose.py b/guided_docker_compose.py index fd5c5ae..a4ac3ab 100755 --- a/guided_docker_compose.py +++ b/guided_docker_compose.py @@ -111,7 +111,7 @@ def configure_chn(): domain = 'https://' + domain url_parsed = urlparse(domain) try: - socket.gethostbyname(url_parsed.netloc) + socket.getaddrinfo(url_parsed.netloc, 443) except Exception as e: sys.stderr.write( make_color("FAIL",