#NEWLINE# def _getResolver( self , serverResponses , maximumQueries = 10 ) : #NEWLINE# #INDENT# '\n        Create and return a new L{root.Resolver} modified to resolve queries\n        against the record data represented by C{servers}.\n\n        @param serverResponses: A mapping from dns server addresses to\n            mappings.  The inner mappings are from query two-tuples (name,\n            type) to dictionaries suitable for use as **arguments to\n            L{_respond}.  See that method for details.\n        ' #NEWLINE# roots = [ '1.1.2.3' ] #NEWLINE# resolver = Resolver ( roots , maximumQueries ) #NEWLINE# def query( query , serverAddresses , timeout , filter ) : #NEWLINE# #INDENT# msg ( ( 'Query for QNAME %s at %r' % ( query . name , serverAddresses ) ) ) #NEWLINE# for addr in serverAddresses : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# server = serverResponses [ addr ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# records = server [ ( query . name . name , query . type ) ] #NEWLINE# return succeed ( self . _respond ( ** records ) ) #NEWLINE# #UNINDENT# #UNINDENT# resolver . _query = query #NEWLINE# return resolver