BF: Duplicate ip addresses returned from socket.gethostbyname_ex

pull/528/head
Steven Hiscocks 2013-12-28 18:15:56 +00:00
parent 087af27c65
commit f460bde73c
1 changed files with 1 additions and 1 deletions

View File

@ -816,7 +816,7 @@ class DNSUtils:
Thanks to Kevin Drapel.
"""
try:
return socket.gethostbyname_ex(dns)[2]
return set(socket.gethostbyname_ex(dns)[2])
except socket.error, e:
logSys.warn("Unable to find a corresponding IP address for %s: %s"
% (dns, e))