HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/platform/bq/third_party/httplib2/python3/ca_certs_locater.py
"""Custom locater for CA_CERTS files."""

import os

def get():
  """Locate the ca_certs.txt file.

  The httplib2 library will look for local ca_certs_locater module to override
  the default location for the ca_certs.txt file. We override it here to first
  try loading via resources, falling back to the traditional method if
  that fails.

  Returns:
    The file location returned as a string.
  """
  file_path = file_base_name = 'cacerts.txt'
  try:
    ca_certs = resources.GetResourceFilename(file_path)
  except (IOError, AttributeError, NameError):
    ca_certs = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), file_base_name)
  return ca_certs