def A(host, nameserver=None):
 if _has_dig():
  return __salt__['dig.A'](host, nameserver)
 elif (nameserver is None):
  try:
   addresses = [sock[4][0] for sock in socket.getaddrinfo(host, None, socket.AF_INET, 0, socket.SOCK_RAW)]
   return addresses
  except socket.gaierror:
   return 'Unable to resolve {0}'.format(host)
 return 'This function requires dig, which is not currently available'

def A ( host , nameserver = None ) : if _has_dig ( ) : return __salt__ [ 'dig.A' ] ( host , nameserver ) elif ( nameserver is None ) : try : addresses = [ sock [ 4 ] [ 0 ] for sock in socket . getaddrinfo ( host , None , socket . AF_INET , 0 , socket . SOCK_RAW ) ] return addresses except socket . gaierror : return 'Unable to resolve {0}' . format ( host ) return 'This function requires dig, which is not currently available'
return the a record(s) for host .