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: //proc/3141915/root/lib/google-cloud-sdk/lib/__pycache__/gcloud.cpython-312.pyc
�

������dZddlmZddlmZddlmZddlZddlZddlZejje
�Zejjed�Z
eejvrejjde�ejje
�rejjde
�d�Zd�Zd	�Zd
Zej(j+d�rdnd
Zd�Zej0d��Zd�Zedk(re�yy)zgcloud command line tool.�)�absolute_import)�division)�unicode_literalsN�third_partyc��dtjvryddl}	t|�y#t$rddl}|j|�YywxYw)a�Reloads the google module to prefer our vendored copy.

  When python is not invoked with the -S option, it can preload google module
  via .pth file setting its __path__. After this happens, our vendored google
  package may not in the __path__. After our vendored dependency directory is
  put at the first place in the sys.path, google module should be reloaded,
  so that our vendored copy can be preferred.
  �googleNr)�sys�modulesr�reload�	NameError�	importlib)rr
s  �
lib/gcloud.py�_fix_google_moduler)sB���S�[�[� �
���
�6�N��	���
���V���s�%�A�Ac��dtjvrIg}g}|D]-}d|vrd|vr|j|��|j|��/|j|�|S|S)alIf site packages are enabled reorder them.

  Make sure bundled_python site-packages appear first in the sys.path.

  Args:
    sys_path: list current sys path

  Returns:
    modified syspath if CLOUDSDK_PYTHON_SITEPACKAGES is on, prefer bundled
    python site packages over all other. Note the returns syspath has the same
    elements but a different order.
  �CLOUDSDK_PYTHON_SITEPACKAGESz
site-packageszplatform/bundledpythonunix)�os�environ�append�extend)�sys_path�new_path�other_site_packages�paths    r�reorder_sys_pathr<sh��$�r�z�z�1��H�����	�D�	 �%A��%M��"�"�4�(������	�

�O�O�'�(��O��O�c�"�ddl}|jS)z(Returns reference to gcloud_main module.rN)�googlecloudsdk.gcloud_main�gcloud_main)�googlecloudsdks r�_import_gcloud_mainr Ws��$�	�	#�	#�#r)��	�)ENABLE_MAX_GCLOUD_PYTHON_VERSION_OVERRIDE)r!�)r!�
c�2�dj|d|d�S)Nz{}.{}r�)�format)�python_versions r�python_version_stringr*fs��	����q�)�>�!�+<�	=�=rc	#��K�	d��y#t$�rRtjdd}|tks	|tkDrId}|tkDrd}nd}djt
|�|t
t�t
t���}n>d}d	jtjt
t�t
t��
�}tjjdj|���|r]d
dl
}tjjdjdj|j�j����tjd�YywxYw�w)z<Handles exceptions from gcloud to provide a helpful message.N�Fz!not currently supported by gcloudzno longer supported by gcloudz�You are running gcloud with Python {python_version}, which is {support_message}.
Install a compatible version of Python {min_python_version}-{max_python_version} and set the CLOUDSDK_PYTHON environment variable to point to it.)r)�support_message�min_python_version�max_python_versionTa\This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python {min_python_version}-{max_python_version} executable:
    {executable}

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python executable.)�
executabler.r/z�ERROR: gcloud failed to load. {error_message}

If you are still experiencing problems, please reinstall the Google Cloud CLI using the instructions here:
    https://cloud.google.com/sdk/docs/install
)�
error_messagerz

{}
�
r')�	Exceptionr	�version_info�MIN_SUPPORTED_PY3_VERSION�MAX_SUPPORTED_PY3_VERSIONr(r*r0�stderr�write�	traceback�join�
format_exc�
splitlines�exit)r)�valid_python_versionr-r1r9s     r�gcloud_exception_handlerr?jsU����8�	��	�6��%�%�b�q�)�N��2�2��2�2�"��	�3�	3�=��9��A�BH��2�>�B�-�!6�+�"-�!6�+�"-�BH�B.�	�"��� �����!6�+�"-�!6�+�"-�	 �.��"�J�J���
:��&�}�&�
-�
���	�j�j���z�(�(�
�)�)�I�(�(�*�5�5�7�
8�:�;��H�H�Q�K�m6�s&�E(�	�E(�EE%�"E(�$E%�%E(c��t�5ttj�t_ddlm}ddd�j
tjd�r	ddl	m
}|j�yt�5t�t�}ddd�tjj!��y#1swY��xYw#t$r'|j
tjd�dk(r�Y��wxYw#1swY�lxYw)Nr)�encoding�_ARGCOMPLETE)�lookup�_ARGCOMPLETE_TRACE�static)r?rr	r�googlecloudsdk.core.utilrA�GetEncodedValuerr�,googlecloudsdk.command_lib.static_completionrC�Completer3rr r=�main)rArCrs   rrJrJ�s����!�����)�C�H�1�"�
���b�j�j�.�9��E��o�o��� �!���%�'�K�"��(�(�;�����)"�!����	�	!�	!�"�*�*�"6�
8�;C�
D�
�
D���
"�!�s)�)B?�C�>C>�?C�-C;�:C;�>D�__main__)�__doc__�
__future__rrr�
contextlibrr	r�dirname�__file__�_GCLOUD_PY_DIRr:�_THIRD_PARTY_DIR�insert�isdirrrr r5r�getr6r*�contextmanagerr?rJ�__name__�rr�<module>rYs���$ �&��'��	�
�������*���7�7�<�<��
�>��
����!��(�(�/�/�!�^�$��7�7�=�=�!�"��(�(�/�/�!�%�&��&�6$�#���z�z�~�~�3��G���>����:��:�z�0�z���&�r