Hacked By AnonymousFox
B
YI~dN � @ s� d ddgZ ddlZddlZddlZddlZddlmZ ddlmZm Z ddl
mZ dZd Z
e�d
�Ze�dej�ZG dd � d �ZG d
d� de�ZdZG dd� de�Zeeejd ��Zde ZejZdS )� Generator�DecodedGenerator�BytesGenerator� N)�deepcopy)�StringIO�BytesIO)�_has_surrogates�_�
z
\r\n|\r|\nz^From c @ s� e Zd Zd&dd�dd�Zdd� Zd'dd �Zd
d� Zdd
� Zdd� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
e
Zdd� Zdd� Zdd� Zd d!� Zed(d"d#��Zed$d%� �ZdS ))r N)�policyc C s6 |d kr|d krdn|j }|| _|| _|| _|| _d S )NT)�mangle_from_�_fp�
_mangle_from_�maxheaderlenr )�self�outfpr r r � r �4/opt/alt/python37/lib64/python3.7/email/generator.py�__init__$ s zGenerator.__init__c C s | j �|� d S )N)r
�write)r �sr r r r D s zGenerator.writeFc C s� | j d kr|j n| j }|d k r*|j|d�}| jd k rB|j| jd�}|j| _| �| j�| _d| _| �| j�| _| j }|j }zL|| _ ||_ |r�|� � }|s�dt
�t
�
� � }| �|| j � | �
|� W d || _ ||_ X d S )N)�linesep)�max_line_length� zFrom nobody )r �cloner r �_NL�_encode�_encoded_NLZ_EMPTY�_encoded_EMPTYZget_unixfrom�timeZctimer �_write)r �msg�unixfromr r Zold_gen_policyZold_msg_policyZufromr r r �flattenH s,
zGenerator.flattenc C s | j || jd | jd�S )N)r )� __class__r r )r �fpr r r r y s zGenerator.clonec C s t � S )N)r )r r r r �_new_buffer� s zGenerator._new_bufferc C s |S )Nr )r r r r r r � s zGenerator._encodec C sX |sd S t �|�}x*|d d� D ]}| �|� | �| j� q W |d rT| �|d � d S )N���)�NLCRE�splitr r )r �lines�liner r r �_write_lines� s
zGenerator._write_linesc C s� | j }z"d | _| �� | _ }| �|� W d || _ | j}| `X |rht|�}|�d|d � |�d|d � t|dd �}|d kr�| �|� n|| � | j �|� � � d S )Nzcontent-transfer-encodingr zcontent-type� �_write_headers)
r
�
_munge_cter&