%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/clemail.cpython-37.pyc

B

`�1b
�@sJddlmZddlmZddlmZddlZddlZdZGdd�d�ZdS)�)�absolute_import)�division)�print_functionNzSubject:c@s&eZdZdZdd�Zeddd��ZdS)�ClEmailz-
    class for generation email messages
    cCsdS)N�)�selfrr�A/opt/alt/python37/lib/python3.7/site-packages/clcommon/clemail.py�__init__szClEmail.__init__NcCs�t�tj�|��}tj|d�}|�tj�|���|��	d�}t
|�dkr�|d�t�r�|ddkr�|d�
td���}|�d�|�d�|d�|�fS)a8
        Generates email message using jinja2 template engine
        :param template_path: path to jinja2 template
        :param templ_data: Data to fill template using jinja2
        :param subject: Email subject to use if it not found in template
        :return: Cortege (email_subject, email_body)
        )�loader�
�r��)�jinja2ZFileSystemLoader�os�path�dirnameZEnvironmentZget_template�basenameZrender�split�len�
startswith�SUBJECT_LINE_PREFIX�replace�strip�pop�join)Z
template_pathZ
templ_dataZsubjectZtempl_loaderZtempl_envirZ
message_linesrrr�generate_mail_jinja2s
&

zClEmail.generate_mail_jinja2)N)�__name__�
__module__�__qualname__�__doc__r	�staticmethodrrrrrrsr)Z
__future__rrrrrrrrrrr�<module>s

Zerion Mini Shell 1.0