def _buildResolvers(config):
 from twisted.names import client, cache, hosts
 (ca, cl) = ([], [])
 if config['cache']:
  ca.append(cache.CacheResolver(verbose=config['verbose']))
 if config['hosts-file']:
  cl.append(hosts.Resolver(file=config['hosts-file']))
 if config['recursive']:
  cl.append(client.createResolver(resolvconf=config['resolv-conf']))
 return (ca, cl)

def _buildResolvers ( config ) : from twisted . names import client , cache , hosts ( ca , cl ) = ( [ ] , [ ] ) if config [ 'cache' ] : ca . append ( cache . CacheResolver ( verbose = config [ 'verbose' ] ) ) if config [ 'hosts-file' ] : cl . append ( hosts . Resolver ( file = config [ 'hosts-file' ] ) ) if config [ 'recursive' ] : cl . append ( client . createResolver ( resolvconf = config [ 'resolv-conf' ] ) ) return ( ca , cl )
build dns resolver instances in an order which leaves recursive resolving as a last resort .