parameters: (self, dns)
docstring: Replace the first nameserver entry with the one given.
docstring_summary: Replace the first nameserver entry with the one given.
docstring_tokens: Replace the first nameserver entry with the one given .
function: def _set_primary_nameserver(self, dns):
      """Replace the first nameserver entry with the one given."""
      try:
        self._write_resolve_conf(dns)
      except OSError, e:
        if 'Permission denied' in e:
          raise self._get_dns_update_error()
        raise
function_tokens: def _set_primary_nameserver ( self , dns ) : try : self . _write_resolve_conf ( dns ) except OSError , e : if 'Permission denied' in e : raise self . _get_dns_update_error ( ) raise