HEX
Server: Apache
System: Linux pdx1-shared-a1-29 6.18.39-grsec-noble+ #4 SMP Thu Jul 23 07:53:29 UTC 2026 x86_64
User: dh_bj99yp (22285841)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/boto/roboto/__pycache__/awsqueryservice.cpython-312.pyc
�

ckF[e����ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	Gd�dejj�ZGd�dejj�Zy)�)�print_functionN)�awsqueryrequestc���eZdZ�fd�Z�xZS)�NoCredentialsErrorc�0��d}tt|�|�y)NzUnable to find credentials)�superr�__init__)�self�s�	__class__s  ��=/usr/lib/python3/dist-packages/boto/roboto/awsqueryservice.pyr	zNoCredentialsError.__init__s���(��
� �$�0��3�)�__name__�
__module__�__qualname__r	�
__classcell__�rs@r
rr
s
���4�4rrc�T��eZdZdZdZdZdZdZdZdZ	dZ
gZ�fd�Zd�Z
d	�Zd
�Z�xZS)�AWSQueryService�zsign-v2�/i��aws�AWS_URLc�t��||_|j�|j�d|jvrd|jrX|jj	d|jdd�}|jD]}|d|k(s�|d|jd<�d|jvr|j
|jd<d|jvr|j|jd<	tt|�&di|j��d|_
y#tjj$rt��wxYw)	N�host�region_namer�name�endpoint�path�port�)�args�check_for_credential_file�check_for_env_url�Regions�get�Path�Portrrr	�aws_response�boto�	exception�NoAuthHandlerFoundr)r
r"r�regionrs    �r
r	zAWSQueryService.__init__s�����	��&�&�(���� �����"��|�|�"�i�i�m�m�M�,0�L�L��O�F�,C�E��"�l�l�?�F��f�~��4�,2�:�,>��	�	�&�)�?�����"� $�	�	�D�I�I�f������"� $�	�	�D�I�I�f��	'��/�4�1�>�D�I�I�>� $�D����~�~�0�0�	'�$�&�&�	'�s�*$D�(D7c���dtjv�rVtjd}tjj|�}tjj	|�}tjj|�r�t
|�}|j�}|j�|D]�}|ddk7s�d|vs�|jdd�\}}|j�dk(r/d|jvs�H|j�}||jd<�h|j�dk(s�|d	|jvs��|j�}||jd	<��ytd
�yy)aq
        Checks for the existence of an AWS credential file.
        If the environment variable AWS_CREDENTIAL_FILE is
        set and points to a file, that file will be read and
        will be searched credentials.
        Note that if credentials have been explicitelypassed
        into the class constructor, those values always take
        precedence.
        �AWS_CREDENTIAL_FILEr�#�=��AWSAccessKeyId�aws_access_key_id�AWSSecretKey�aws_secret_access_keyz+Warning: unable to read AWS_CREDENTIAL_FILEN)
�os�environr�
expanduser�
expandvars�isfile�open�	readlines�close�split�stripr"�print)r
r�fp�lines�liner�values       r
r#z)AWSQueryService.check_for_credential_file2s$��!�B�J�J�.��:�:�3�4�D��7�7�%�%�d�+�D��7�7�%�%�d�+�D��w�w�~�~�d�#��$�Z����������
�!�O�D��A�w�#�~��$�;�*.�*�*�S�!�*<�K�D�%�#�z�z�|�/?�?�#6�d�i�i�#G�,1�K�K�M�E�EJ�D�I�I�.A�$B�!%�����!?�#:�$�)�)�#K�,1�K�K�M�E�IN�D�I�I�.E�$F�O��C�D�+/rc���|jjdd�}|r
|jd=|s9|jtjvrtj|j}|�rtj
|�}d|jvr.|jdk(rd|jd<nd|jd<|j}d}|jd�}t|�dkDr|d	}t|d�}d
|jvr||jd
<|rd|jvr||jd<|jr)d|jvr|j|jd<yyyy)
a�
        First checks to see if a url argument was explicitly passed
        in.  If so, that will be used.  If not, it checks for the
        existence of the environment variable specified in ENV_URL.
        If this is set, it should contain a fully qualified URL to the
        service you want to use.
        Note that any values passed explicitly to the class constructor
        will take precedence.
        �urlN�	is_secure�httpsTF�:r2rrr r)r"r&�EnvURLr7r8�urlparse�scheme�netlocr?�len�intr)r
rG�rsltrr �ls      r
r$z!AWSQueryService.check_for_env_urlSs4���i�i�m�m�E�4�(����	�	�%� ��t�{�{�b�j�j�0��*�*�T�[�[�)�C���$�$�S�)�D��$�)�)�+��;�;�'�)�-1�D�I�I�k�*�-2�D�I�I�k�*��;�;�D��D��
�
�3��A��1�v��z���t���1�Q�4�y���T�Y�Y�&�$(��	�	�&�!���d�i�i�/�$(��	�	�&�!��y�y�V�4�9�9�4�$(�I�I��	�	�&�!�5�y�'rc��|jgS)N)�Authentication)r
s r
�_required_auth_capabilityz)AWSQueryService._required_auth_capabilityxs���#�#�$�$r)rrr�Name�Description�
APIVersionrTr'r(�ProviderrKr%r	r#r$rUrrs@r
rrsG���
�D��K��J��N��D��D��H�
�F��G�'�*E�B#.�J%rr)�
__future__rr7rLr*�boto.connection�boto.jsonresponse�boto.exception�boto.robotorr+�BotoClientErrorr�
connection�AWSQueryConnectionrr!rr
�<module>rbsK��%�	������'�4����7�7�4�i%�d�o�o�8�8�i%r