o
    DXīhę  ć                   @   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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/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZd7S )8z email package exception classes.c                   @   ó   e Zd ZdZdS )ŚMessageErrorz+Base class for errors in the email package.N©Ś__name__Ś
__module__Ś__qualname__Ś__doc__© r   r   ś6/opt/python-3.10.19/usr/lib/python3.10/email/errors.pyr      ó    r   c                   @   r   )ŚMessageParseErrorz&Base class for message parsing errors.Nr   r   r   r   r	   r      r
   r   c                   @   r   )ŚHeaderParseErrorzError while parsing headers.Nr   r   r   r   r	   r      r
   r   c                   @   r   )ŚBoundaryErrorz#Couldn't find terminating boundary.Nr   r   r   r   r	   r      r
   r   c                   @   r   )ŚMultipartConversionErrorz(Conversion to a multipart is prohibited.Nr   r   r   r   r	   r      r
   r   c                   @   r   )ŚCharsetErrorzAn illegal charset was given.Nr   r   r   r   r	   r      r
   r   c                   @   r   )ŚHeaderWriteErrorzError while writing headers.Nr   r   r   r   r	   r       r
   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 ur
t   |” || _d S ©N)ŚsuperŚ__init__Śline)Śselfr   ©Ś	__class__r   r	   r   (   s   
zMessageDefect.__init__r   ©r   r   r   r   r   Ś__classcell__r   r   r   r	   r   %   s    r   c                   @   r   )ŚNoBoundaryInMultipartDefectzBA message claimed to be a multipart but had no boundary parameter.Nr   r   r   r   r	   r   -   r
   r   c                   @   r   )ŚStartBoundaryNotFoundDefectz+The claimed start boundary was never found.Nr   r   r   r   r	   r   0   r
   r   c                   @   r   )ŚCloseBoundaryNotFoundDefectzEA start boundary was found, but not the corresponding close boundary.Nr   r   r   r   r	   r   3   r
   r   c                   @   r   )Ś#FirstHeaderLineIsContinuationDefectz;A message had a continuation line as its first header line.Nr   r   r   r   r	   r   6   r
   r   c                   @   r   )ŚMisplacedEnvelopeHeaderDefectz?A 'Unix-from' header was found in the middle of a header block.Nr   r   r   r   r	   r   9   r
   r   c                   @   r   )Ś MissingHeaderBodySeparatorDefectzEFound line with no leading whitespace and no colon before blank line.Nr   r   r   r   r	   r    <   r
   r    c                   @   r   )Ś!MultipartInvariantViolationDefectz?A message claimed to be a multipart but no subparts were found.Nr   r   r   r   r	   r!   A   r
   r!   c                   @   r   )Ś-InvalidMultipartContentTransferEncodingDefectzEAn invalid content transfer encoding was set on the multipart itself.Nr   r   r   r   r	   r"   D   r
   r"   c                   @   r   )ŚUndecodableBytesDefectz0Header contained bytes that could not be decodedNr   r   r   r   r	   r#   G   r
   r#   c                   @   r   )ŚInvalidBase64PaddingDefectz/base64 encoded sequence had an incorrect lengthNr   r   r   r   r	   r$   J   r
   r$   c                   @   r   )ŚInvalidBase64CharactersDefectz=base64 encoded sequence had characters not in base64 alphabetNr   r   r   r   r	   r%   M   r
   r%   c                   @   r   )ŚInvalidBase64LengthDefectz4base64 encoded sequence had invalid length (1 mod 4)Nr   r   r   r   r	   r&   P   r
   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|i |¤ d S r   )r   r   )r   ŚargsŚkwr   r   r	   r   X   s   zHeaderDefect.__init__r   r   r   r   r	   r'   U   s    r'   c                   @   r   )ŚInvalidHeaderDefectz+Header is not valid, message gives details.Nr   r   r   r   r	   r*   [   r
   r*   c                   @   r   )ŚHeaderMissingRequiredValuez(A header that must have a value had noneNr   r   r   r   r	   r+   ^   r
   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 r   )r   r   Śnon_printables)r   r-   r   r   r	   r   d   s   
zNonPrintableDefect.__init__c                 C   s   d  | j”S )Nz6the following ASCII non-printables found in header: {})Śformatr-   )r   r   r   r	   Ś__str__h   s   ’zNonPrintableDefect.__str__)r   r   r   r   r   r/   r   r   r   r   r	   r,   a   s    r,   c                   @   r   )ŚObsoleteHeaderDefectz0Header uses syntax declared obsolete by RFC 5322Nr   r   r   r   r	   r0   l   r
   r0   c                   @   r   )ŚNonASCIILocalPartDefectz(local_part contains non-ASCII charactersNr   r   r   r   r	   r1   o   r
   r1   c                   @   r   )ŚInvalidDateDefectz%Header has unparsable or invalid dateNr   r   r   r   r	   r2   t   r
   r2   N) r   Ś	Exceptionr   r   r   r   Ś	TypeErrorr   r   r   Ś
ValueErrorr   r   r   r   r   r   r    ZMalformedHeaderDefectr!   r"   r#   r$   r%   r&   r'   r*   r+   r,   r0   r1   r2   r   r   r   r	   Ś<module>   s:   