Your IP : 216.73.216.213


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

B

:��]�2�(@s�dZddlmZmZddlZddlmZddlmZGdd�de	�Z
Gdd	�d	e
�ZGd
d�de	�ZGdd
�d
e	�Z
Gdd�de�ZGdd�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	�ZyBddlZej eej!eej"eiZ#e$ed.��r�ee#ej%<ee#ej&<Wne'k
�r�iZ#YnXd/d0�Z(Gd1d2�d2e	�Z)Gd3d4�d4e)�Z*Gd5d6�d6e*�Z+Gd7d8�d8e)�Z,Gd9d:�d:e*�Z-Gd;d<�d<e*�Z.Gd=d>�d>e/�Z0Gd?d@�d@e/�Z1GdAdB�dBe2�Z3e�4edCdDdd�dEe5dB�GdFdG�dGe,�Z6GdHdI�dIe*�Z7GdJdK�dKe	�Z8GdLdM�dMe9�Z:GdNdO�dOe9�Z;GdPdQ�dQe9�Z<GdRdS�dSe9�Z=GdTdU�dUe9�Z>GdVdW�dWe?�Z@GdXdY�dYe	�ZAGdZd[�d[e	�ZBGd\d]�d]e	�ZCGd^d_�d_e	�ZDGd`da�dae	�ZEGdbdc�dce/�ZFdd	dd
dddddddddd!d#d%d'd)d+d-d0d2d4d8d<d>d@dBdGdIdKdMdOdQdUdWdYd]d_dcg(ZGdS)dz<
Exceptions and errors for use in twisted.internet modules.
�)�division�absolute_importN)�	deprecate)�Versionc@seZdZdZdd�ZdS)�	BindErrorz)An error occurred binding to an interfacecCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %s� z%s.)�__doc__�args�join)�self�s�r
�I/opt/alt/python37/lib64/python3.7/site-packages/twisted/internet/error.py�__str__s
zBindError.__str__N)�__name__�
__module__�__qualname__rrr
r
r
rrsrc@s eZdZdZdd�Zdd�ZdS)�CannotListenErrora2
    This gets raised by a call to startListening, when the object cannotstart
    listening.

    @ivar interface: the interface I tried to listen on
    @ivar port: the port I tried to listen on
    @ivar socketError: the exception I got when I tried to listen
    @type socketError: L{socket.error}
    cCs&t�||||�||_||_||_dS)N)r�__init__�	interface�port�socketError)rrrrr
r
rr'szCannotListenError.__init__cCs|jpd}d||j|jfS)N�anyzCouldn't listen on %s:%s: %s.)rrr)rZifacer
r
rr-s
zCannotListenError.__str__N)rrrrrrr
r
r
rrs	rc@seZdZdZdS)�MulticastJoinErrorz6
    An attempt to join a multicast group failed.
    N)rrrrr
r
r
rr4src@seZdZdZdd�ZdS)�MessageLengthErrorzMessage is too long to sendcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rr>s
zMessageLengthError.__str__N)rrrrrr
r
r
rr;src@seZdZdZdd�ZdS)�DNSLookupErrorzDNS lookup failedcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rrJs
zDNSLookupError.__str__N)rrrrrr
r
r
rrGsrc@seZdZdZdS)�ConnectInProgressErrorz3A connect operation was started and isn't done yet.N)rrrrr
r
r
rrSsrc@s"eZdZdZddd�Zdd�ZdS)	�ConnectErrorz"An error occurred while connectingN�cCs||_t�||�dS)N)�osError�	Exceptionr)rr�stringr
r
rr\szConnectError.__init__cCsJ|jp|jj}|jr"d||jf}|jdr>d||jdf}d|}|S)Nz%s: %srz%s.)r�	__class__rrr	)rrr
r
rr`s
zConnectError.__str__)Nr)rrrrrrr
r
r
rrYs
rc@seZdZdZdS)�ConnectBindErrorz
Couldn't bindN)rrrrr
r
r
rr#ksr#c@seZdZdZdS)�UnknownHostErrorzHostname couldn't be looked upN)rrrrr
r
r
rr$psr$c@seZdZdZdS)�NoRouteErrorzNo route to hostN)rrrrr
r
r
rr%usr%c@seZdZdZdS)�ConnectionRefusedErrorz$Connection was refused by other sideN)rrrrr
r
r
rr&zsr&c@seZdZdZdS)�TCPTimedOutErrorzTCP connection timed outN)rrrrr
r
r
rr'sr'c@seZdZdZdS)�BadFileErrorz$File used for UNIX socket is no goodN)rrrrr
r
r
rr(�sr(c@seZdZdZdS)�ServiceNameUnknownErrorz%Service name given as port is unknownN)rrrrr
r
r
rr)�sr)c@seZdZdZdS)�	UserErrorzUser aborted connectionN)rrrrr
r
r
rr*�sr*c@seZdZdZdS)�TimeoutErrorz&User timeout caused connection failureN)rrrrr
r
r
rr+�sr+c@seZdZdZdS)�SSLErrorzAn SSL error occurredN)rrrrr
r
r
rr,�sr,c@seZdZdZdS)�VerifyErrorz?Could not verify something that was supposed to be signed.
    N)rrrrr
r
r
rr-�sr-c@seZdZdZdS)�PeerVerifyErrorz(The peer rejected our verify error.
    N)rrrrr
r
r
rr.�sr.c@seZdZdZdS)�CertificateErrorzF
    We did not find a certificate where we expected to find one.
    N)rrrrr
r
r
rr/�sr/�WSAECONNREFUSEDcCspt|t�r|j}n|}y|\}}Wntk
r<t|d�SXttd�rZt|tj�rZt}nt	�
|t�}|||�S)z2Given a socket exception, return connection error.)r!�gaierror)�
isinstancer r	�
ValueErrorr�hasattr�socketr1r$�errnoMapping�get)�er	�numberr!�klassr
r
r�getConnectError�s
r;c@seZdZdZdS)�ConnectionClosedz@
    Connection was closed, whether cleanly or non-cleanly.
    N)rrrrr
r
r
rr<�sr<c@seZdZdZdd�ZdS)�ConnectionLostz<Connection to the other side was lost in a non-clean fashioncCs8|j����d}|jr,d|d�|j�f}d|}|S)Nrz%s: %srz%s.)r�strip�
splitlinesr	r
)rrr
r
rr�s
zConnectionLost.__str__N)rrrrrr
r
r
rr=�sr=c@seZdZdZdd�ZdS)�ConnectionAbortedz�
    Connection was aborted locally, using
    L{twisted.internet.interfaces.ITCPTransport.abortConnection}.

    @since: 11.1
    cCs<dg}|jr(|�d�|�d�|j��|�d�d�|�S)NzBConnection was aborted locally using ITCPTransport.abortConnectionz: r�.r)r	�appendr
)rrr
r
rr�s

zConnectionAborted.__str__N)rrrrrr
r
r
rr@�sr@c@seZdZdZdd�ZdS)�ConnectionDonezConnection was closed cleanlycCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rr�s
zConnectionDone.__str__N)rrrrrr
r
r
rrC�srCc@seZdZdZdS)�FileDescriptorOverrunaw
    A mis-use of L{IUNIXTransport.sendFileDescriptor} caused the connection to
    be closed.

    Each file descriptor sent using C{sendFileDescriptor} must be associated
    with at least one byte sent using L{ITransport.write}.  If at any point
    fewer bytes have been written than file descriptors have been sent, the
    connection is closed with this exception.
    N)rrrrr
r
r
rrDs	rDc@seZdZdZdS)�ConnectionFdescWentAwayZUhN)rrrrr
r
r
rrEsrEc@seZdZdZdd�ZdS)�
AlreadyCalledz'Tried to cancel an already-called eventcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rrs
zAlreadyCalled.__str__N)rrrrrr
r
r
rrFsrFc@seZdZdZdd�ZdS)�AlreadyCancelledz*Tried to cancel an already-cancelled eventcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rr)s
zAlreadyCancelled.__str__N)rrrrrr
r
r
rrG&srGc@seZdZdZdZdS)�PotentialZombieWarningz�
    Emitted when L{IReactorProcess.spawnProcess} is called in a way which may
    result in termination of the created child process not being reported.

    Deprecated in Twisted 10.0.
    z�spawnProcess called, but the SIGCHLD handler is not installed. This probably means you have not yet called reactor.run, or called reactor.run(installSignalHandler=0). You will probably never see this process finish, and it may become a zombie process.N)rrrrZMESSAGEr
r
r
rrH2srH�Twisted�
z4There is no longer any potential for zombie process.c@seZdZdZdd�ZdS)�ProcessDonez+A process has ended without apparent errorscCs"t�|d�d|_d|_||_dS)Nz!process finished with exit code 0r)r r�exitCode�signal�status)rrNr
r
rrLszProcessDone.__init__N)rrrrrr
r
r
rrKIsrKc@seZdZdZddd�ZdS)�ProcessTerminatedz�
    A process has ended with a probable error condition

    @ivar exitCode: See L{__init__}
    @ivar signal: See L{__init__}
    @ivar status: See L{__init__}
    NcCsN||_||_||_d}|dk	r*|d|}|dk	r>|d|}t�||�dS)a�
        @param exitCode: The exit status of the process.  This is roughly like
            the value you might pass to L{os.exit}.  This is L{None} if the
            process exited due to a signal.
        @type exitCode: L{int} or L{None}

        @param signal: The exit signal of the process.  This is L{None} if the
            process did not exit due to a signal.
        @type signal: L{int} or L{None}

        @param status: The exit code of the process.  This is a platform
            specific combination of the exit code and the exit signal.  See
            L{os.WIFEXITED} and related functions.
        @type status: L{int}
        z
process endedNz with exit code %sz
 by signal %s)rLrMrNr r)rrLrMrNrr
r
rr\szProcessTerminated.__init__)NNN)rrrrrr
r
r
rrOTsrOc@seZdZdZdS)�ProcessExitedAlreadyzd
    The process has already exited and the operation requested can no longer
    be performed.
    N)rrrrr
r
r
rrPvsrPc@seZdZdZdd�ZdS)�NotConnectingErrorzEThe Connector was not connecting when it was asked to stop connectingcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rr�s
zNotConnectingError.__str__N)rrrrrr
r
r
rrQ~srQc@seZdZdZdd�ZdS)�NotListeningErrorz>The Port was not listening when it was asked to stop listeningcCs,|j}|jr d|d�|j�f}d|}|S)Nz%s: %srz%s.)rr	r
)rrr
r
rr�s
zNotListeningError.__str__N)rrrrrr
r
r
rrR�srRc@seZdZdZdS)�ReactorNotRunningzJ
    Error raised when trying to stop a reactor which is not running.
    N)rrrrr
r
r
rrS�srSc@seZdZdZdS)�ReactorNotRestartablezF
    Error raised when trying to run a reactor which was stopped.
    N)rrrrr
r
r
rrT�srTc@seZdZdZdS)�ReactorAlreadyRunningzG
    Error raised when trying to start the reactor multiple times.
    N)rrrrr
r
r
rrU�srUc@seZdZdZdS)�ReactorAlreadyInstalledErrorzE
    Could not install reactor because one is already installed.
    N)rrrrr
r
r
rrV�srVc@seZdZdZdd�ZdS)�ConnectingCancelledErrorz�
    An C{Exception} that will be raised when an L{IStreamClientEndpoint} is
    cancelled before it connects.

    @ivar address: The L{IAddress} that is the destination of the
        cancelled L{IStreamClientEndpoint}.
    cCst�||�||_dS)z�
        @param address: The L{IAddress} that is the destination of the
            L{IStreamClientEndpoint} that was cancelled.
        N)r r�address)rrXr
r
rr�sz!ConnectingCancelledError.__init__N)rrrrrr
r
r
rrW�srWc@seZdZdZdS)�
NoProtocolz�
    An C{Exception} that will be raised when the factory given to a
    L{IStreamClientEndpoint} returns L{None} from C{buildProtocol}.
    N)rrrrr
r
r
rrY�srYc@seZdZdZdS)�UnsupportedAddressFamilyz�
    An attempt was made to use a socket with an address family (eg I{AF_INET},
    I{AF_INET6}, etc) which is not supported by the reactor.
    N)rrrrr
r
r
rrZ�srZc@seZdZdZdS)�UnsupportedSocketTypez�
    An attempt was made to use a socket of a type (eg I{SOCK_STREAM},
    I{SOCK_DGRAM}, etc) which is not supported by the reactor.
    N)rrrrr
r
r
rr[�sr[c@seZdZdZdS)�AlreadyListenedzd
    An attempt was made to listen on a file descriptor which can only be
    listened on once.
    N)rrrrr
r
r
rr\�sr\c@seZdZdZdd�ZdS)�InvalidAddressErrorz�
    An invalid address was specified (i.e. neither IPv4 or IPv6, or expected
    one and got the other).

    @ivar address: See L{__init__}
    @ivar message: See L{__init__}
    cCs||_||_dS)z�
        @param address: The address that was provided.
        @type address: L{bytes}
        @param message: A native string of additional information provided by
            the calling context.
        @type address: L{str}
        N)rX�message)rrXr^r
r
rr�szInvalidAddressError.__init__N)rrrrrr
r
r
rr]�sr])Hr�
__future__rrr5Ztwisted.pythonrZincrementalrr rrrr�IOErrorrrrr#r$r%r&r'r(r)r*r+r,r-r.r/�errnoZENETUNREACHZECONNREFUSEDZ	ETIMEDOUTr6r4r0ZWSAENETUNREACH�ImportErrorr;r<r=r@rCrDrEr3rFrG�WarningrHZdeprecatedModuleAttributerrKrOrP�RuntimeErrorrQrRrSrTrU�AssertionErrorrVrWrYrZr[r\r]�__all__r
r
r
r�<module>s�



"