

def _check_peers(peers):
    'Checks whether the input is a valid list of peers and transforms domain names into IP Addresses'
    if (not isinstance(dns_ip, list)):
        return False
    for peer in peers:
        if (not isinstance(peer, str)):
            return False
    ip_only_peers = list()
    for peer in peers:
        try:
            ip_only_peers.append(str(IPAddress(peer)))
        except AddrFormatError:
            dns_reply = list()
            try:
                dns_reply = dns.resolver.query(peer)
            except dns.resolver.NoAnswer:
                continue
            for dns_ip in dns_reply:
                ip_only_peers.append(str(dns_ip))
    peers = ip_only_peers
    return True

dataset/ETHPy150Open saltstack/salt/salt/states/netntp.py _check_peers/VarMisuse@17/54 `peers`->`dns_ip`