
ΰWΟ  γ               @   s#  d  Z  Gd d   d e  Z Gd d   d e  Z Gd d   d e  Z Gd d   d e  Z Gd	 d
   d
 e e  Z Gd d   d e  Z Gd d   d e	  Z
 Gd d   d e
  Z Gd d   d e
  Z Gd d   d e
  Z Gd d   d e
  Z Gd d   d e
  Z Gd d   d e
  Z e Z Gd d   d e
  Z Gd d   d e
  Z Gd d    d  e
  Z Gd! d"   d" e
  Z Gd# d$   d$ e
  Z Gd% d&   d& e
  Z Gd' d(   d( e  Z Gd) d*   d* e  Z Gd+ d,   d, e  Z Gd- d.   d. e  Z Gd/ d0   d0 e  Z d1 S)2z 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   ϊ;/afs/.cs/s/python-3.5.2/amd64_ubu14/lib/python3.5/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   S)ΪMessageDefectz Base class for a message defect.Nc                s)   | d  k	 r t    j |  | |  _ d  S)N)ΪsuperΪ__init__Ϊline)Ϊselfr   )Ϊ	__class__r   r   r   $   s    zMessageDefect.__init__)r   r   r   r   r   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   f d d   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   Q   s    zHeaderDefect.__init__)r   r   r   r   r   r   r   )r   r   r   N   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!   T   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"   W   s   r"   c                   s4   e  Z d  Z d Z   f d d   Z d d   Z   S)ΪNonPrintableDefectz8ASCII characters outside the ascii-printable range foundc                s   t    j |  | |  _ d  S)N)r   r   Ϊnon_printables)r   r$   )r   r   r   r   ]   s    zNonPrintableDefect.__init__c             C   s   d j  |  j  S)Nz6the following ASCII non-printables found in header: {})Ϊformatr$   )r   r   r   r   Ϊ__str__a   s    zNonPrintableDefect.__str__)r   r   r   r   r   r&   r   r   )r   r   r#   Z   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'   e   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(   h   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   Ϊ<module>   s2   