diff --git a/superset/utils/network.py b/superset/utils/network.py index 8079a96e203..8ae08d2c01b 100644 --- a/superset/utils/network.py +++ b/superset/utils/network.py @@ -44,7 +44,7 @@ def is_hostname_valid(host: str) -> bool: Test if a given hostname can be resolved. """ try: - socket.gethostbyname(host) + socket.getaddrinfo(host, None) return True except socket.gaierror: return False