From 0b43970e6629e9bf3217f78008f5e03bd4a794db Mon Sep 17 00:00:00 2001 From: Stepan Ardalin Date: Mon, 22 May 2017 18:07:47 +0300 Subject: [PATCH] Add ipv6 support --- mongodb_consistent_backup/Common/Util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongodb_consistent_backup/Common/Util.py b/mongodb_consistent_backup/Common/Util.py index 5ad3e831..a2c4713a 100644 --- a/mongodb_consistent_backup/Common/Util.py +++ b/mongodb_consistent_backup/Common/Util.py @@ -25,6 +25,6 @@ def validate_hostname(hostname): try: if ":" in hostname: hostname, port = hostname.split(":") - socket.gethostbyname(hostname) + socket.getaddrinfo(hostname, None) except socket.error, e: raise OperationError("Could not resolve host '%s', error: %s" % (hostname, e))