def _get_machines_cache_from_dns(self, host, port):
        """One host might be resolved into multiple ip addresses. We will make list out of it"""
        if self.protocol == 'http':
            ret = []
            for af, _, _, _, sa in self._dns_resolver.resolve(host, port):
                host, port = sa[:2]
                if af == socket.AF_INET6:
                    host = '[{0}]'.format(host)
                ret.append(uri(self.protocol, host, port))
            if ret:
                return list(set(ret))
        return [uri(self.protocol, host, port)]
def _get_machines_cache_from_dns ( self , host , port ) : if self . protocol == 'http' : ret = [ ] for af , _ , _ , _ , sa in self . _dns_resolver . resolve ( host , port ) : host , port = sa [ : 2 ] if af == socket . AF_INET6 : host = '[{0}]' . format ( host ) ret . append ( uri ( self . protocol , host , port ) ) if ret : return list ( set ( ret ) ) return [ uri ( self . protocol , host , port ) ]
One host might be resolved into multiple ip addresses. We will make list out of it