HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/botocore/__pycache__/errorfactory.cpython-38.pyc
U

KD�g��@s8ddlmZddlmZGdd�d�ZGdd�d�ZdS)�)�ClientError)�get_service_module_namec@s(eZdZeZdd�Zdd�Zdd�ZdS)�BaseClientExceptionscCs
||_dS)aBase class for exceptions object on a client

        :type code_to_exception: dict
        :param code_to_exception: Mapping of error codes (strings) to exception
            class that should be raised when encountering a particular
            error code.
        N)�_code_to_exception)�self�code_to_exception�r�B/opt/cppython/lib/python3.8/site-packages/botocore/errorfactory.py�__init__szBaseClientExceptions.__init__cCs|j�||j�S)aNRetrieves the error class based on the error code

        This is helpful for identifying the exception class needing to be
        caught based on the ClientError.parsed_reponse['Error']['Code'] value

        :type error_code: string
        :param error_code: The error code associated to a ClientError exception

        :rtype: ClientError or a subclass of ClientError
        :returns: The appropriate modeled exception class for that error
            code. If the error code does not match any of the known
            modeled exceptions then return a generic ClientError.
        )r�getr)r�
error_coderrr	�	from_codeszBaseClientExceptions.from_codecCs6dd�|j��D�}t|�d|�dd�|�����dS)NcSsg|]
}|j�qSr)�__name__)�.0�
exception_clsrrr	�
<listcomp>/s�z4BaseClientExceptions.__getattr__.<locals>.<listcomp>z object has no attribute z. Valid exceptions are: z, )r�values�AttributeError�join)r�nameZexception_cls_namesrrr	�__getattr__.s��z BaseClientExceptions.__getattr__N)r�
__module__�__qualname__rr
r
rrrrr	rs
rc@s$eZdZdd�Zdd�Zdd�ZdS)�ClientExceptionsFactorycCs
i|_dS)N)�_client_exceptions_cache)rrrr	r
:sz ClientExceptionsFactory.__init__cCs.|j}||jkr$|�|�}||j|<|j|S)a�Creates a ClientExceptions object for the particular service client

        :type service_model: botocore.model.ServiceModel
        :param service_model: The service model for the client

        :rtype: object that subclasses from BaseClientExceptions
        :returns: The exceptions object of a client that can be used
            to grab the various different modeled exceptions.
        )�service_namer�_create_client_exceptions)r�
service_modelrZclient_exceptionsrrr	�create_client_exceptions=s




z0ClientExceptionsFactory.create_client_exceptionsc
Csli}i}|jD]6}t|j�}t|tfi�}|||<t|j�}|||<qtt|�d�}t|tf|�}	|	|�S)NZ
Exceptions)Zerror_shapes�strr�typerrrr)
rrZ	cls_propsrZerror_shape�exception_namer�code�cls_nameZclient_exceptions_clsrrr	rMs



�z1ClientExceptionsFactory._create_client_exceptionsN)rrrr
rrrrrr	r9srN)Zbotocore.exceptionsrZbotocore.utilsrrrrrrr	�<module>
s(