pf ( d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ g dZ dd l Z dd lZdd lZdd l Z dd lZdd lmZmZ ddlmZ ddlmZ dd lmZ dd lmc mc mZ dZdZ e j de j Z! G d de" Z# G d de# Z$dZ% G d de# Z& e' e(ej) dz Z*de*z Z+e#j, Z,d S )z:Classes to generate plain text from a message object tree. )print_function)unicode_literals)division)absolute_import)super)str) GeneratorDecodedGeneratorBytesGeneratorN)StringIOBytesIO)compat32)Header)_has_surrogates_ z^From c e Zd ZdZddZd ZddZd Zd Zd Z d Z d Zd Zd Z d Zd ZeZd Zd Zd Zd Zedd Zed ZdS )r zGenerates output from a Message object tree. This basic generator writes the message to the given file object as plain text. TNc d d|v r|d }|d= nd } || _ || _ || _ || _ d S )Npolicy)_fp _mangle_from_maxheaderlenr )selfoutfpmangle_from_r _3to2kwargsr s r/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/future/backports/email/generator.py__init__zGenerator.__init__+ sO {""[-BFT\H]H]f * )( c : | j | d S N)r writer ss r r" zGenerator.writeH s qr Fc | j |j n| j }|| | }| j | | j }|j | _ | | j | _ d| _ | d | _ | j }|j } || _ ||_ |r[| }|s(dt j t j z }| || j z | | || _ ||_ dS # || _ ||_ w xY w)az Print the message object tree rooted at msg to the output file specified when the Generator instance was created. unixfrom is a flag that forces the printing of a Unix From_ delimiter before the first object in the message tree. If the original message has no From_ delimiter, a `standard' one is crafted. By default, this is False to inhibit the printing of any From_ delimiter. Note that for subobjects, no From_ line is printed. linesep specifies the characters used to indicate a new line in the output. The default value is determined by the policy. N)linesepmax_line_length zFrom nobody )r cloner r&