File: D:/Python311/Lib/site-packages/mysql/connector/locales/__pycache__/__init__.cpython-311.pyc
�
�nc�
� �$ � d Z dgZddlmZ dd�ZdS )z
Translations.�get_client_error� )� errorcode�engc �� � t d|� �t � � t � � dg� � }n"# t $ r t d|� d�� � d�w xY w|j }t | t � � r0| }t j � � � D ]\ }}||k r|} n�t | t � � r" t || � � S # t $ r Y dS w xY wt d� � �)a� Lookup client error
This function will lookup the client error message based on the given
error and return the error message. If the error was not found,
None will be returned.
Error can be either an integer or a string. For example:
error: 2000
error: CR_UNKNOWN_ERROR
The language attribute can be used to retrieve a localized message, when
available.
Returns a string or None.
zmysql.connector.locales.�client_errorz&No localization support for language '�'Nz6error argument needs to be either an integer or string)�
__import__�globals�locals�ImportErrorr �
isinstance�intr �__dict__�items�str�getattr�AttributeError�
ValueError)�error�language�tmpr �errno�key�values �BD:\Python311\Lib\site-packages\mysql/connector/locales/__init__.pyr r $ s1 � �
��1�x�1�1��I�I��H�H�
��
�
���� � � � ��@�X�@�@�@�
�
�� ����� �#�L��%���� ���#�,�2�2�4�4� � �J�C����~�
�����
� �%�#��� � ��<��/�/�/��� � � ��4�4� ���� �M�
N�
N�Ns �.1 �A�5C �
C�CN)r )�__doc__�__all__� r r � � r �<module>r! sK ��: � ��
�� � � � � � �*O� *O� *O� *O� *O� *Or