def callback(answer, name, rr, flags, data): print name, data, status_name(answer[0]) for entry in answer[3]: if data == 'SOA': print ' ', entry[0] else: print ' ', entry
def callback(self, answer, name, rr, flags, results): # print name, answer status = answer[0] server_list = list(answer[3]) if server_list: server_list.sort() results[name] = server_list[0][0] else: error_string = status_name(status) if error_string == 'norecurse': sys.exit(11) results[name] = 'status=' + error_string