관리-도구
편집 파일: exceptions.cpython-39.opt-1.pyc
a ������+b�����������������������@���s����d�dl�ZejrddlmZ�G�dd��de�ZG�dd��deee�Z G�dd ��d e �Z G�d d��de�ZG�dd ��d e�ZG�dd��de�Z G�dd��de �ZG�dd��de �ZG�dd��de �ZdS�)�����N������ Undefinedc�����������������������sH���e�Zd�ZdZd eje�dd���fdd� Zeeje�d�dd��Z ���Z S�) � TemplateErrorz"Baseclass for all template errors.N)�message�returnc��������������������s���t����|��d�S��N)�super�__init__)�selfr����� __class__���E/usr/lib/python3.9/site-packages/ansible/_vendor/jinja2/exceptions.pyr ��� ���s����zTemplateError.__init__�r���c�����������������C���s���|�j�r|�j�d�S�d�S�)Nr���)�args�r���r���r���r���r��� ���s����zTemplateError.message)N)�__name__� __module__�__qualname__�__doc__�t�Optional�strr ����propertyr���� __classcell__r���r���r���r���r������s���r���c�������������������@���s\���e�Zd�ZU�dZdZeje�ed<�dejej edf��eje�dd�dd�Z ed�d d �ZdS�)�TemplateNotFoundz�Raised if a template does not exist. .. versionchanged:: 2.11 If the given name is :class:`Undefined` and no message was provided, an :exc:`UndefinedError` is raised. Nr���r���)�namer���r���c�����������������C���sN���t��|�|��|d�u�r6ddlm}�t||�r2|����|}||�_||�_|g|�_d�S�)Nr���r���) �IOErrorr ����runtimer���� isinstanceZ_fail_with_undefined_errorr���r���� templates)r���r���r���r���r���r���r���r ������s���� zTemplateNotFound.__init__r���c�����������������C���s ���t�|�j�S�r���)r���r���r���r���r���r����__str__1���s����zTemplateNotFound.__str__)N)r���r���r���r���r���r���r���r����__annotations__�Unionr ���r"���r���r���r���r���r������s��� ���r���c�����������������������sB���e�Zd�ZdZdejejedf��eje�dd���fdd� Z ���Z S�) �TemplatesNotFounda���Like :class:`TemplateNotFound` but raised if multiple templates are selected. This is a subclass of :class:`TemplateNotFound` exception, so just catching the base exception will catch both. .. versionchanged:: 2.11 If a name in the list of names is :class:`Undefined`, a message about it being undefined is shown rather than the empty string. .. versionadded:: 2.2 r���Nr���)�namesr���r���c��������������������s����|d�u�r^ddl�m}�g�}|D�]&}t||�r8|�|j��q|�|��qd�tt|��}d|���}t��� |rp|d�nd�|��t |�|�_d�S�)Nr���r���z, z(none of the templates given were found: ���)r���r���r ����appendZ_undefined_message�join�mapr���r ���r ����listr!���)r���r&���r���r����partsr���Z parts_strr���r���r���r ���A���s���� zTemplatesNotFound.__init__)r���N)r���r���r���r���r����Sequencer$���r���r���r ���r���r���r���r���r���r%���5���s��� ����r%���c�����������������������sR���e�Zd�ZdZdeeeje�eje�dd���fdd� Zed�dd�Z d d ��Z ���ZS�)�TemplateSyntaxErrorzBRaised to tell the user that there is a problem with the template.N)r����linenor����filenamer���c��������������������s.���t����|��||�_||�_||�_d�|�_d|�_d�S�)NF)r ���r ���r/���r���r0����source� translated)r���r���r/���r���r0���r���r���r���r ���[���s����zTemplateSyntaxError.__init__r���c�����������������C���s����|�j�rt�t|�j�S�d|�j���}|�jp*|�j}|r@d|��d|���}t�t|�j�d|�g}|�jd�ur�z|�j� ��|�jd��}W�n�t y����Y�n0�|�d|������d� |�S�)Nzline zFile "z", z r���z � )r2���r����castr���r���r/���r0���r���r1���� splitlines� IndexErrorr(����stripr)���)r����locationr����lines�liner���r���r���r"���l���s���� zTemplateSyntaxError.__str__c�����������������C���s���|�j�|�j|�j|�j|�jffS�r���)r ���r���r/���r���r0���r���r���r���r���� __reduce__����s����zTemplateSyntaxError.__reduce__)NN)r���r���r���r���r����intr���r���r ���r"���r;���r���r���r���r���r���r.���X���s�������r.���c�������������������@���s���e�Zd�ZdZdS�)�TemplateAssertionErrora��Like a template syntax error, but covers cases where something in the template caused an error at compile time that wasn't necessarily caused by a syntax error. However it's a direct subclass of :exc:`TemplateSyntaxError` and has the same attributes. N�r���r���r���r���r���r���r���r���r=�������s���r=���c�������������������@���s���e�Zd�ZdZdS�)�TemplateRuntimeErrorzoA generic runtime error in the template engine. Under some situations Jinja may raise this exception. Nr>���r���r���r���r���r?�������s���r?���c�������������������@���s���e�Zd�ZdZdS�)�UndefinedErrorz<Raised if a template tries to operate on :class:`Undefined`.Nr>���r���r���r���r���r@�������s���r@���c�������������������@���s���e�Zd�ZdZdS�)� SecurityErrorzWRaised if a template tries to do something insecure if the sandbox is enabled. Nr>���r���r���r���r���rA�������s���rA���c�������������������@���s���e�Zd�ZdZdS�)�FilterArgumentErrorzQThis error is raised if a filter was called with inappropriate arguments Nr>���r���r���r���r���rB�������s���rB���)�typingr���� TYPE_CHECKINGr���r���� Exceptionr���r����LookupErrorr���r%���r.���r=���r?���r@���rA���rB���r���r���r���r����<module>���s���##3