관리-도구
편집 파일: __init__.cpython-38.pyc
U )�e � @ s$ d Z dgZddlmZ ddd�ZdS )z Translations �get_client_error� )� errorcode�engc C s� zt d�|�t� t� dg�}W n" tk r@ td�|���Y nX |j}t| t�rz| }tj � � D ]\}}||kr`|} qzq`t| t�r�zt|| �W S t k r� Y dS X td��dS )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.{0}�client_errorz*No localization support for language '{0}'Nz6error argument needs to be either an integer or string)� __import__�format�globals�locals�ImportErrorr � isinstance�intr �__dict__�items�str�getattr�AttributeError� ValueError)�error�language�tmpr �errno�key�value� r �u/opt/hc_python/lib64/python3.8/site-packages/../../../lib/python3.8/site-packages/mysql/connector/locales/__init__.pyr ! s. �� N)r )�__doc__�__all__� r r r r r r �<module> s �