From 958104e0908e7f050868d14067f34c4cdb40cd81 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Sun, 2 Sep 2018 11:56:22 +0100 Subject: [PATCH] fix: really fix get_address_info License: MIT Signed-off-by: Alan Shaw --- lib/http.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/http.py b/lib/http.py index 632d2f7..f0dabb9 100644 --- a/lib/http.py +++ b/lib/http.py @@ -199,10 +199,7 @@ def open_http_socket(method, url, json=None, timeout=None, headers=None, data=No def get_address_info(host, port, retries_left = 20): try: - if is_ipv4_address(host): - return (host, port) - else: - return usocket.getaddrinfo(host, port)[0][4] + return usocket.getaddrinfo(host, port)[0][4] except OSError as e: if ("-15" in str(e)) and retries_left: # [addrinfo error -15]