Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/twisted/mail/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/twisted/mail/__pycache__/_except.cpython-37.pyc

B

?j];"�@s�dZddlmZmZddlmZmZGdd�de�ZGdd�de�Z	Gdd	�d	e�Z
Gd
d�de�ZGdd
�d
e�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�ZGd$d%�d%e�ZGd&d'�d'e�ZGd(d)�d)e�ZGd*d+�d+e�ZGd,d-�d-e�ZGd.d/�d/e�ZGd0d1�d1e�ZGd2d3�d3e�ZGd4d5�d5e�Z Gd6d7�d7e�Z!Gd8d9�d9e�Z"Gd:d;�d;e�Z#Gd<d=�d=e�Z$Gd>d?�d?e�Z%Gd@dA�dAe%�Z&GdBdC�dCe&�Z'GdDdE�dEe&�Z(GdFdG�dGe�Z)GdHdI�dIe�Z*GdJdK�dKe�Z+GdLdM�dMe�Z,GdNdO�dOe,�Z-GdPdQ�dQe,�Z.GdRdS�dSe,�Z/GdTdU�dUe,�Z0GdVdW�dWe,�Z1dXS)Yz 
Exceptions in L{twisted.mail}.
�)�absolute_import�division)�_PY3�unicodec@seZdZdS)�IMAP4ExceptionN)�__name__�
__module__�__qualname__�r
r
�G/opt/alt/python37/lib64/python3.7/site-packages/twisted/mail/_except.pyr
src@seZdZdS)�IllegalClientResponseN)rrr	r
r
r
rrsrc@seZdZdS)�IllegalOperationN)rrr	r
r
r
rr
sr
c@seZdZdS)�IllegalMailboxEncodingN)rrr	r
r
r
rrsrc@seZdZdS)�MailboxExceptionN)rrr	r
r
r
rr!src@seZdZdd�ZdS)�MailboxCollisioncCs
d|jS)NzMailbox named %s already exists)�args)�selfr
r
r�__str__'szMailboxCollision.__str__N)rrr	rr
r
r
rr&src@seZdZdd�ZdS)�
NoSuchMailboxcCs
d|jS)NzNo mailbox named %s exists)r)rr
r
rr-szNoSuchMailbox.__str__N)rrr	rr
r
r
rr,src@seZdZdd�ZdS)�ReadOnlyMailboxcCsdS)NzMailbox open in read-only stater
)rr
r
rr3szReadOnlyMailbox.__str__N)rrr	rr
r
r
rr2src@seZdZdS)�UnhandledResponseN)rrr	r
r
r
rr7src@seZdZdS)�NegativeResponseN)rrr	r
r
r
rr<src@seZdZdd�Zdd�ZdS)�NoSupportedAuthenticationcCst�|d�||_||_dS)Nz-No supported authentication schemes available)r�__init__�serverSupports�clientSupports)rrrr
r
rrBsz"NoSupportedAuthentication.__init__cCst�|�d|j|jfS)Nz(: Server supports %r, client supports %r)rrrr)rr
r
rrHsz!NoSupportedAuthentication.__str__N)rrr	rrr
r
r
rrAsrc@seZdZdS)�IllegalServerResponseN)rrr	r
r
r
rrOsrc@seZdZdS)�IllegalIdentifierErrorN)rrr	r
r
r
rrTsrc@seZdZdS)�IllegalQueryErrorN)rrr	r
r
r
rrYsrc@seZdZdS)�MismatchedNestingN)rrr	r
r
r
rr^src@seZdZdS)�MismatchedQuotingN)rrr	r
r
r
rr csr c@seZdZdS)�	SMTPErrorN)rrr	r
r
r
rr!hsr!c@s*eZdZdZd
dd�Zdd�Zdd	�ZdS)�SMTPClientErrorz,
    Base class for SMTP client errors.
    NFcCs(||_||_||_||_||_||_dS)a�
        @param code: The SMTP response code associated with this error.

        @param resp: The string response associated with this error.

        @param log: A string log of the exchange leading up to and including
            the error.
        @type log: L{bytes}

        @param isFatal: A boolean indicating whether this connection can
            proceed or not. If True, the connection will be dropped.

        @param retry: A boolean indicating whether the delivery should be
            retried. If True and the factory indicates further retries are
            desirable, they will be attempted, otherwise the delivery will be
            failed.
        N)�code�resp�log�	addresses�isFatal�retry)rr#r$r%r&r'r(r
r
rrqszSMTPClientError.__init__cCstr|���d�S|��SdS)Nzutf-8)r�	__bytes__�decode)rr
r
rr�szSMTPClientError.__str__cCsz|jdkrd�|j|j�g}n|jg}|jrB|�|j�|�d�x,t|�D] \}}t|t�rL|�d�||<qLWd�	|�S)Nrz	{:03d} {}�zutf-8�
)
r#�formatr$r%�append�	enumerate�
isinstancer�encode�join)r�res�i�rr
r
rr)�s


zSMTPClientError.__bytes__)NNFF)rrr	�__doc__rrr)r
r
r
rr"ms

r"c@seZdZdZdS)�ESMTPClientErrorz-
    Base class for ESMTP client errors.
    N)rrr	r6r
r
r
rr7�sr7c@seZdZdZdS)�EHLORequiredErrorz{
    The server does not support EHLO.

    This is considered a non-fatal error (the connection will not be dropped).
    N)rrr	r6r
r
r
rr8�sr8c@seZdZdZdS)�AUTHRequiredErrorz�
    Authentication was required but the server does not support it.

    This is considered a non-fatal error (the connection will not be dropped).
    N)rrr	r6r
r
r
rr9�sr9c@seZdZdZdS)�TLSRequiredErrorz�
    Transport security was required but the server does not support it.

    This is considered a non-fatal error (the connection will not be dropped).
    N)rrr	r6r
r
r
rr:�sr:c@seZdZdZdS)�AUTHDeclinedErrorz�
    The server rejected our credentials.

    Either the username, password, or challenge response
    given to the server was rejected.

    This is considered a non-fatal error (the connection will not be
    dropped).
    N)rrr	r6r
r
r
rr;�s	r;c@seZdZdZdS)�AuthenticationErrorz�
    An error occurred while authenticating.

    Either the server rejected our request for authentication or the
    challenge received was malformed.

    This is considered a non-fatal error (the connection will not be
    dropped).
    N)rrr	r6r
r
r
rr<�s	r<c@seZdZdZdS)�SMTPTLSErrorz�
    An error occurred while negiotiating for transport security.

    This is considered a non-fatal error (the connection will not be dropped).
    N)rrr	r6r
r
r
rr=�sr=c@seZdZdZddd�ZdS)�SMTPConnectErrorzt
    Failed to connect to the mail exchange host.

    This is considered a fatal error.  A retry will be made.
    NTc	Cst�|||||||�dS)N)r"r)rr#r$r%r&r'r(r
r
rr�szSMTPConnectError.__init__)NNTT)rrr	r6rr
r
r
rr>�sr>c@seZdZdZddd�ZdS)�SMTPTimeoutErrorz�
    Failed to receive a response from the server in the expected time period.

    This is considered a fatal error.  A retry will be made.
    NTc	Cst�|||||||�dS)N)r"r)rr#r$r%r&r'r(r
r
rr�szSMTPTimeoutError.__init__)NNTT)rrr	r6rr
r
r
rr?�sr?c@seZdZdZddd�ZdS)�SMTPProtocolErrorzo
    The server sent a mangled response.

    This is considered a fatal error.  A retry will not be made.
    NTFc	Cst�|||||||�dS)N)r"r)rr#r$r%r&r'r(r
r
rrszSMTPProtocolError.__init__)NNTF)rrr	r6rr
r
r
rr@sr@c@seZdZdZdS)�SMTPDeliveryErrorz=
    Indicates that a delivery attempt has had an error.
    N)rrr	r6r
r
r
rrAsrAc@seZdZdd�Zdd�ZdS)�SMTPServerErrorcCs||_||_dS)N)r#r$)rr#r$r
r
rrszSMTPServerError.__init__cCsd|j|jfS)Nz%.3d %s)r#r$)rr
r
rrszSMTPServerError.__str__N)rrr	rrr
r
r
rrBsrBc@seZdZdd�Zdd�ZdS)�SMTPAddressErrorcCs(ddlm}t�|||�||�|_dS)Nr)�Address)Ztwisted.mail.smtprDrBr�addr)rrEr#r$rDr
r
rr!szSMTPAddressError.__init__cCsd|j|j|jfS)Nz%.3d <%s>... %s)r#rEr$)rr
r
rr(szSMTPAddressError.__str__N)rrr	rrr
r
r
rrC srCc@seZdZddd�ZdS)�SMTPBadRcpt�&�$Cannot receive for specified addresscCst�||||�dS)N)rCr)rrEr#r$r
r
rr.szSMTPBadRcpt.__init__N)rGrH)rrr	rr
r
r
rrF-srFc@seZdZddd�ZdS)�
SMTPBadSender�&�Sender not acceptablecCst�||||�dS)N)rCr)rrEr#r$r
r
rr5szSMTPBadSender.__init__N)rJrK)rrr	rr
r
r
rrI4srIc@seZdZdZdS)�AddressErrorz 
    Parse error in address
    N)rrr	r6r
r
r
rrL:srLc@seZdZdZdS)�	POP3Errorz)
    The base class for POP3 errors.
    N)rrr	r6r
r
r
rrM@srMc@seZdZdZdS)�_POP3MessageDeletedzb
    An internal control-flow error which indicates that a deleted message was
    requested.
    N)rrr	r6r
r
r
rrNHsrNc@seZdZdZdS)�POP3ClientErrorzA
    The base class for all exceptions raised by POP3Client.
    N)rrr	r6r
r
r
rrOPsrOc@seZdZdZdS)� InsecureAuthenticationDisallowedze
    An error indicating secure authentication was required but no mechanism
    could be found.
    N)rrr	r6r
r
r
rrPWsrPc@seZdZdZdS)�TLSErrorz�
    An error indicating secure authentication was required but either the
    transport does not support TLS or no TLS context factory was supplied.
    N)rrr	r6r
r
r
rrQ_srQc@seZdZdZdS)�TLSNotSupportedErrorzi
    An error indicating secure authentication was required but the server does
    not support TLS.
    N)rrr	r6r
r
r
rrRgsrRc@seZdZdZddd�ZdS)�ServerErrorResponsez
    An error indicating that the server returned an error response to a
    request.

    @ivar consumer: See L{__init__}
    NcCst�||�||_dS)a
        @type reason: L{bytes}
        @param reason: The server response minus the status indicator.

        @type consumer: callable that takes L{object}
        @param consumer: The function meant to handle the values for a
            multi-line response.
        N)rOr�consumer)r�reasonrTr
r
rrvs	zServerErrorResponse.__init__)N)rrr	r6rr
r
r
rrSosrSc@seZdZdZdS)�LineTooLongz�
    An error indicating that the server sent a line which exceeded the
    maximum line length (L{LineOnlyReceiver.MAX_LENGTH}).
    N)rrr	r6r
r
r
rrV�srVN)2r6�
__future__rrZtwisted.python.compatrr�	Exceptionrrr
rrrrrrrrrrrrr r!r"r7r8r9r:r;r<r=r>r?r@rArBrCrFrIrLrMrNrOrPrQrRrSrVr
r
r
r�<module>sX5