B
    Uÿþe?  ã               @   sž  d Z G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG d	d
„ d
eeƒZG dd„ deƒZG dd„ de	ƒZ
G dd„ de
ƒZG dd„ de
ƒZG dd„ de
ƒZG dd„ de
ƒZG dd„ de
ƒZG dd„ de
ƒZeZG dd„ de
ƒZG dd„ de
ƒZG dd „ d e
ƒZG d!d"„ d"e
ƒZG d#d$„ d$e
ƒZG d%d&„ d&e
ƒZG d'd(„ d(e
ƒZG d)d*„ d*eƒZG d+d,„ d,eƒZG d-d.„ d.eƒZG d/d0„ d0eƒZG d1d2„ d2eƒZd3S )4z email package exception classes.c               @   s   e Zd ZdZdS )ÚMessageErrorz+Base class for errors in the email package.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú"/usr/lib/python3.7/email/errors.pyr      s   r   c               @   s   e Zd ZdZdS )ÚMessageParseErrorz&Base class for message parsing errors.N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ÚHeaderParseErrorzError while parsing headers.N)r   r   r   r   r   r   r   r   r	      s   r	   c               @   s   e Zd ZdZdS )ÚBoundaryErrorz#Couldn't find terminating boundary.N)r   r   r   r   r   r   r   r   r
      s   r
   c               @   s   e Zd ZdZdS )ÚMultipartConversionErrorz(Conversion to a multipart is prohibited.N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ÚCharsetErrorzAn illegal charset was given.N)r   r   r   r   r   r   r   r   r      s   r   c                   s"   e Zd ZdZd‡ fdd„	Z‡  ZS )ÚMessageDefectz Base class for a message defect.Nc                s   |d k	rt ƒ  |¡ || _d S )N)ÚsuperÚ__init__Úline)Úselfr   )Ú	__class__r   r   r   $   s    zMessageDefect.__init__)N)r   r   r   r   r   Ú__classcell__r   r   )r   r   r   !   s   r   c               @   s   e Zd ZdZdS )ÚNoBoundaryInMultipartDefectzBA message claimed to be a multipart but had no boundary parameter.N)r   r   r   r   r   r   r   r   r   )   s   r   c               @   s   e Zd ZdZdS )ÚStartBoundaryNotFoundDefectz+The claimed start boundary was never found.N)r   r   r   r   r   r   r   r   r   ,   s   r   c               @   s   e Zd ZdZdS )ÚCloseBoundaryNotFoundDefectzEA start boundary was found, but not the corresponding close boundary.N)r   r   r   r   r   r   r   r   r   /   s   r   c               @   s   e Zd ZdZdS )Ú#FirstHeaderLineIsContinuationDefectz;A message had a continuation line as its first header line.N)r   r   r   r   r   r   r   r   r   2   s   r   c               @   s   e Zd ZdZdS )ÚMisplacedEnvelopeHeaderDefectz?A 'Unix-from' header was found in the middle of a header block.N)r   r   r   r   r   r   r   r   r   5   s   r   c               @   s   e Zd ZdZdS )Ú MissingHeaderBodySeparatorDefectzEFound line with no leading whitespace and no colon before blank line.N)r   r   r   r   r   r   r   r   r   8   s   r   c               @   s   e Zd ZdZdS )Ú!MultipartInvariantViolationDefectz?A message claimed to be a multipart but no subparts were found.N)r   r   r   r   r   r   r   r   r   =   s   r   c               @   s   e Zd ZdZdS )Ú-InvalidMultipartContentTransferEncodingDefectzEAn invalid content transfer encoding was set on the multipart itself.N)r   r   r   r   r   r   r   r   r   @   s   r   c               @   s   e Zd ZdZdS )ÚUndecodableBytesDefectz0Header contained bytes that could not be decodedN)r   r   r   r   r   r   r   r   r   C   s   r   c               @   s   e Zd ZdZdS )ÚInvalidBase64PaddingDefectz/base64 encoded sequence had an incorrect lengthN)r   r   r   r   r   r   r   r   r   F   s   r   c               @   s   e Zd ZdZdS )ÚInvalidBase64CharactersDefectz=base64 encoded sequence had characters not in base64 alphabetN)r   r   r   r   r   r   r   r   r   I   s   r   c               @   s   e Zd ZdZdS )ÚInvalidBase64LengthDefectz4base64 encoded sequence had invalid length (1 mod 4)N)r   r   r   r   r   r   r   r   r   L   s   r   c                   s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚHeaderDefectzBase class for a header defect.c                s   t ƒ j||Ž d S )N)r   r   )r   ÚargsÚkw)r   r   r   r   T   s    zHeaderDefect.__init__)r   r   r   r   r   r   r   r   )r   r   r    Q   s   r    c               @   s   e Zd ZdZdS )ÚInvalidHeaderDefectz+Header is not valid, message gives details.N)r   r   r   r   r   r   r   r   r#   W   s   r#   c               @   s   e Zd ZdZdS )ÚHeaderMissingRequiredValuez(A header that must have a value had noneN)r   r   r   r   r   r   r   r   r$   Z   s   r$   c                   s(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚNonPrintableDefectz8ASCII characters outside the ascii-printable range foundc                s   t ƒ  |¡ || _d S )N)r   r   Únon_printables)r   r&   )r   r   r   r   `   s    zNonPrintableDefect.__init__c             C   s   d  | j¡S )Nz6the following ASCII non-printables found in header: {})Úformatr&   )r   r   r   r   Ú__str__d   s    zNonPrintableDefect.__str__)r   r   r   r   r   r(   r   r   r   )r   r   r%   ]   s   r%   c               @   s   e Zd ZdZdS )ÚObsoleteHeaderDefectz0Header uses syntax declared obsolete by RFC 5322N)r   r   r   r   r   r   r   r   r)   h   s   r)   c               @   s   e Zd ZdZdS )ÚNonASCIILocalPartDefectz(local_part contains non-ASCII charactersN)r   r   r   r   r   r   r   r   r*   k   s   r*   N)r   Ú	Exceptionr   r   r	   r
   Ú	TypeErrorr   r   Ú
ValueErrorr   r   r   r   r   r   r   ZMalformedHeaderDefectr   r   r   r   r   r   r    r#   r$   r%   r)   r*   r   r   r   r   Ú<module>   s4   