dyn53/dyn53.py
def check(subdomain, domain, addr):
    """ Bypass what our dns says and ask directly to the authority.

    zresolver is passed by kwarg to allow overriding in the tests.
    """
    zresolver = resolver.Resolver()
    try:
        for each in resolver.query(domain, 'NS'):

            ns_srv = resolver.query(each.to_text())[0].to_text()
            zresolver.nameservers.clear()
            zresolver.nameservers.append(ns_srv)
        res = zresolver.query("%s.%s" % (subdomain, domain), 'A')[0].to_text()
        return res == addr
    except (NoAnswer, NXDOMAIN):
        logger.error("Can't resolve!")
        return False
 Bypass what our dns says and ask directly to the authority.

    zresolver is passed by kwarg to allow overriding in the tests.
    
Bypass what our dns says and ask directly to the authority.
zresolver is passed by kwarg to allow overriding in the tests.
Bypass what our dns says and ask directly to the authority . zresolver is passed by kwarg to allow overriding in the tests .
def check(subdomain, domain, addr):
    zresolver = resolver.Resolver()
    try:
        for each in resolver.query(domain, 'NS'):
            ns_srv = resolver.query(each.to_text())[0].to_text()
            zresolver.nameservers.clear()
            zresolver.nameservers.append(ns_srv)
        res = zresolver.query("%s.%s" % (subdomain, domain), 'A')[0].to_text()
        return res == addr
    except (NoAnswer, NXDOMAIN):
        logger.error("Can't resolve!")
        return False
def check ( subdomain , domain , addr ) : zresolver = resolver . Resolver ( ) try : for each in resolver . query ( domain , 'NS' ) : ns_srv = resolver . query ( each . to_text ( ) ) [ 0 ] . to_text ( ) zresolver . nameservers . clear ( ) zresolver . nameservers . append ( ns_srv ) res = zresolver . query ( "%s.%s" % ( subdomain , domain ) , 'A' ) [ 0 ] . to_text ( ) return res == addr except ( NoAnswer , NXDOMAIN ) : logger . error ( "Can't resolve!" ) return False
Bypass what our dns says and ask directly to the authority.
Bypass what our dns says and ask directly to the authority .
""" Bypass what our dns says and ask directly to the authority.

    zresolver is passed by kwarg to allow overriding in the tests.
    """
subdomain
domain
addr