HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/internet/__pycache__/error.cpython-38.pyc
U

�b�4�(@s�dZddlZddlmZddlmZGdd�de�ZGdd�de�ZGd	d
�d
e�Z	Gdd�de�Z
Gd
d�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �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�ZzBddlZejeejeejeiZ e!ed-��r�ee ej"<ee ej#<Wne$k
�r�iZ YnXd.d/�Z%Gd0d1�d1e�Z&Gd2d3�d3e&�Z'Gd4d5�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/�Z0e�1edBdCdd�dDe2dA�GdEdF�dFe)�Z3GdGdH�dHe'�Z4GdIdJ�dJe�Z5GdKdL�dLe6�Z7GdMdN�dNe6�Z8GdOdP�dPe6�Z9GdQdR�dRe6�Z:GdSdT�dTe6�Z;GdUdV�dVe<�Z=GdWdX�dXe�Z>GdYdZ�dZe�Z?Gd[d\�d\e�Z@Gd]d^�d^e�ZAGd_d`�d`e�ZBGdadb�dbe,�ZCddd
ddddddddddd d"d$d&d(d*d,d/d1d3d7d;d=d?dAdFdHdJdLdNdPdTdVdXd\d^dbg(ZDdS)cz<
Exceptions and errors for use in twisted.internet modules.
�N)�Version)�	deprecatec@s"eZdZdZZed�dd�ZdS)�	BindErrorz)An error occurred binding to an interface��returncCs,|j}|jr d�|d�|j��}d|}|S�Nz{}: {}� �%s.��MESSAGE�args�format�join��self�s�r�8/usr/lib/python3/dist-packages/twisted/internet/error.py�__str__s
zBindError.__str__N��__name__�
__module__�__qualname__�__doc__r�strrrrrrrsrc@s&eZdZdZdd�Zed�dd�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)rrrr rrrr&szCannotListenError.__init__rcCs|jpd}d�||j|j�S)N�anyzCouldn't listen on {}:{}: {}.)rr
rr )r�ifacerrrr,s
�zCannotListenError.__str__N)rrrrrrrrrrrrs
rc@seZdZdZdS)�MulticastJoinErrorz6
    An attempt to join a multicast group failed.
    N�rrrrrrrrr#3sr#c@s"eZdZdZZed�dd�ZdS)�MessageLengthErrorzMessage is too long to sendrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrr<s
zMessageLengthError.__str__Nrrrrrr%9sr%c@s"eZdZdZZed�dd�ZdS)�DNSLookupErrorzDNS lookup failedrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrrGs
zDNSLookupError.__str__Nrrrrrr&Dsr&c@seZdZdZdS)�ConnectInProgressErrorz3A connect operation was started and isn't done yet.Nr$rrrrr'Osr'c@s,eZdZdZZd	dd�Zed�dd�ZdS)
�ConnectErrorz"An error occurred while connectingN�cCs||_t�||�dSr)�osError�	Exceptionr)rr*�stringrrrrYszConnectError.__init__rcCsF|j}|jr|�d|j��}|jdr:|�d|jd��}d|}|S)N�: rr	)rr*rrrrrr]s
zConnectError.__str__)Nr))rrrrrrrrrrrrr(Vs
r(c@seZdZdZZdS)�ConnectBindErrorz
Couldn't bindN�rrrrrrrrrr.gsr.c@seZdZdZZdS)�UnknownHostErrorzHostname couldn't be looked upNr/rrrrr0ksr0c@seZdZdZZdS)�NoRouteErrorzNo route to hostNr/rrrrr1osr1c@seZdZdZZdS)�ConnectionRefusedErrorz$Connection was refused by other sideNr/rrrrr2ssr2c@seZdZdZZdS)�TCPTimedOutErrorzTCP connection timed outNr/rrrrr3wsr3c@seZdZdZZdS)�BadFileErrorz$File used for UNIX socket is no goodNr/rrrrr4{sr4c@seZdZdZZdS)�ServiceNameUnknownErrorz%Service name given as port is unknownNr/rrrrr5sr5c@seZdZdZZdS)�	UserErrorzUser aborted connectionNr/rrrrr6�sr6c@seZdZdZZdS)�TimeoutErrorz&User timeout caused connection failureNr/rrrrr7�sr7c@seZdZdZZdS)�SSLErrorzAn SSL error occurredNr/rrrrr8�sr8c@seZdZdZZdS)�VerifyErrorz:Could not verify something that was supposed to be signed.Nr/rrrrr9�sr9c@seZdZdZZdS)�PeerVerifyErrorz#The peer rejected our verify error.Nr/rrrrr:�sr:c@seZdZdZZdS)�CertificateErrorz<We did not find a certificate where we expected to find one.Nr/rrrrr;�sr;�WSAECONNREFUSEDcCstt|t�r|j}n|}z|\}}Wntk
r@t|d�YSXttd�r^t|tj�r^t}nt	�
|t�}|||�S)z2Given a socket exception, return connection error.)r,�gaierror)�
isinstancer+r�
ValueErrorr(�hasattr�socketr=r0�errnoMapping�get)�erZnumberr,�klassrrr�getConnectError�s
rFc@seZdZdZdS)�ConnectionClosedz@
    Connection was closed, whether cleanly or non-cleanly.
    Nr$rrrrrG�srGc@s"eZdZdZZed�dd�ZdS)�ConnectionLostzF
    Connection to the other side was lost in a non-clean fashion
    rcCsL|j����dd�}|jr8|�d�|�d�|j��|�d�d�|�S)N�r-r�.r))r�strip�
splitlinesr�appendrrrrrr�s

zConnectionLost.__str__NrrrrrrH�srHc@seZdZdZdZdS)�ConnectionAbortedz�
    Connection was aborted locally, using
    L{twisted.internet.interfaces.ITCPTransport.abortConnection}.

    @since: 11.1
    zBConnection was aborted locally using ITCPTransport.abortConnectionNr/rrrrrN�srNc@s"eZdZdZZed�dd�ZdS)�ConnectionDonezConnection was closed cleanlyrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrr�s
zConnectionDone.__str__NrrrrrrO�srOc@seZdZdZdZdS)�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.
    zRA mis-use of IUNIXTransport.sendFileDescriptor caused the connection to be closed.Nr/rrrrrP�s�rPc@seZdZdZZdS)�ConnectionFdescWentAwayZUhNr/rrrrrQ�srQc@s"eZdZdZZed�dd�ZdS)�
AlreadyCalledz'Tried to cancel an already-called eventrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrrs
zAlreadyCalled.__str__NrrrrrrR�srRc@s"eZdZdZZed�dd�ZdS)�AlreadyCancelledz*Tried to cancel an already-cancelled eventrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrrs
zAlreadyCancelled.__str__NrrrrrrSsrSc@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.Nr/rrrrrTs�rT�Twisted�
z4There is no longer any potential for zombie process.c@seZdZdZZdd�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)rrZrrrr0szProcessDone.__init__N�rrrrrrrrrrrW-srWc@seZdZdZZddd�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)rXrYrZr+r)rrXrYrZrrrrr@szProcessTerminated.__init__)NNNr[rrrrr\7sr\c@seZdZdZdS)�ProcessExitedAlreadyzd
    The process has already exited and the operation requested can no longer
    be performed.
    Nr$rrrrr][sr]c@s"eZdZdZZed�dd�ZdS)�NotConnectingErrorzEThe Connector was not connecting when it was asked to stop connectingrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrrgs
zNotConnectingError.__str__Nrrrrrr^bs�r^c@s"eZdZdZZed�dd�ZdS)�NotListeningErrorz>The Port was not listening when it was asked to stop listeningrcCs,|j}|jr d�|d�|j��}d|}|Srr
rrrrrrs
zNotListeningError.__str__Nrrrrrr_osr_c@seZdZdZdS)�ReactorNotRunningzJ
    Error raised when trying to stop a reactor which is not running.
    Nr$rrrrr`zsr`c@seZdZdZdS)�ReactorNotRestartablezF
    Error raised when trying to run a reactor which was stopped.
    Nr$rrrrra�srac@seZdZdZdS)�ReactorAlreadyRunningzG
    Error raised when trying to start the reactor multiple times.
    Nr$rrrrrb�srbc@seZdZdZdS)�ReactorAlreadyInstalledErrorzE
    Could not install reactor because one is already installed.
    Nr$rrrrrc�srcc@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)rrerrrr�sz!ConnectingCancelledError.__init__N�rrrrrrrrrrd�srdc@seZdZdZdS)�
NoProtocolz�
    An C{Exception} that will be raised when the factory given to a
    L{IStreamClientEndpoint} returns L{None} from C{buildProtocol}.
    Nr$rrrrrg�srgc@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.
    Nr$rrrrrh�srhc@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.
    Nr$rrrrri�sric@seZdZdZdS)�AlreadyListenedzd
    An attempt was made to listen on a file descriptor which can only be
    listened on once.
    Nr$rrrrrj�srjc@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)re�message)rrerlrrrr�szInvalidAddressError.__init__Nrfrrrrrk�srk)ErrA�incrementalr�twisted.pythonrr+rrr#r%�IOErrorr&r'r(r.r0r1r2r3r4r5r6r7r8r9r:r;�errnoZENETUNREACHZECONNREFUSEDZ	ETIMEDOUTrBr@r<ZWSAENETUNREACH�ImportErrorrFrGrHrNrOrPrQr?rRrS�WarningrT�deprecatedModuleAttributerrWr\r]�RuntimeErrorr^r_r`rarb�AssertionErrorrcrdrgrhrirjrk�__all__rrrr�<module>s��

�
$
�