Hacked By AnonymousFox
U
e5d�X � @ s� d Z ddgZddlZddlmZ ddlmZ ddlmZ ddl m
Z
e�d �Ze�d
�Z
e�d�Ze�d
�Ze�d�Zd
ZdZe� ZG dd� de�ZG dd� d�ZG dd� de�ZdS )a FeedParser - An email feed parser.
The feed parser implements an interface for incrementally parsing an email
message, line by line. This has advantages for certain applications, such as
those reading email messages off a socket.
FeedParser.feed() is the primary interface for pushing new data into the
parser. It returns when there's nothing more it can do with the available
data. When you have no more data to push into the parser, call .close().
This completes the parsing and returns the root message object.
The other advantage of this parser is that it will never raise a parsing
exception. Instead, when it finds something unexpected, it adds a 'defect' to
the current message. Defects are just instances that live on the message
object's .defects attribute.
�
FeedParser�BytesFeedParser� N)�errors)�compat32)�deque)�StringIOz
\r\n|\r|\nz(\r\n|\r|\n)z(\r\n|\r|\n)\Zz%^(From |[\041-\071\073-\176]*:|[\t ])� �
c @ s` e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dS )�BufferedSubFileak A file-ish object that can have new data loaded into it.
You can also push and pop line-matching predicates onto a stack. When the
current predicate matches the current line, a false EOF response
(i.e. empty string) is returned instead. This lets the parser adhere to a
simple abstraction -- it parses until EOF closes the current message.
c C s$ t dd�| _t� | _g | _d| _d S )Nr )�newlineF)r �_partialr �_lines� _eofstack�_closed��self� r �(/usr/lib64/python3.8/email/feedparser.py�__init__5 s zBufferedSubFile.__init__c C s | j �|� d S �N)r �append)r Zpredr r r �push_eof_matcher@ s z BufferedSubFile.push_eof_matcherc C s
| j �� S r )r �popr r r r �pop_eof_matcherC s zBufferedSubFile.pop_eof_matcherc C s<