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
Replace the first nameserver entry with the one given.
dataset/ETHPy150Open chromium/web-page-replay/platformsettings.py/_LinuxPlatformSettings._set_primary_nameserver