def _fallback_get_mx_domains(domain):
 try:
  query = dns.message.make_query(domain, dns.rdatatype.MX)
  answers = dns.query.udp(query, GOOGLE_DNS_IP).answer[0]
  return [a for a in answers if (a.rdtype == dns.rdatatype.MX)]
 except:
  return []

def _fallback_get_mx_domains ( domain ) : try : query = dns . message . make_query ( domain , dns . rdatatype . MX ) answers = dns . query . udp ( query , GOOGLE_DNS_IP ) . answer [ 0 ] return [ a for a in answers if ( a . rdtype == dns . rdatatype . MX ) ] except : return [ ]
sometimes dns .