o b4@sjdZddlZddlmZddlmZGdddeZGdddeZGd d d eZ Gd d d eZ Gd dde Z GdddeZ GdddeZGdddeZGdddeZGdddeZGdddeZGdddeZGdddeZGdd d eZGd!d"d"eZGd#d$d$eZGd%d&d&eZGd'd(d(eZGd)d*d*eZGd+d,d,eZz ddlZejeejeejeiZ e!ed-ree ej"<ee ej#<Wn e$yiZ Ynwd.d/Z%Gd0d1d1eZ&Gd2d3d3e&Z'Gd4d5d5e'Z(Gd6d7d7e&Z)Gd8d9d9e'Z*Gd:d;d;e'Z+Gdd?d?e,Z.Gd@dAdAe/Z0e1edBdCdddDe2dAGdEdFdFe)Z3GdGdHdHe'Z4GdIdJdJeZ5GdKdLdLe6Z7GdMdNdNe6Z8GdOdPdPe6Z9GdQdRdRe6Z:GdSdTdTe6Z;GdUdVdVe<Z=GdWdXdXeZ>GdYdZdZeZ?Gd[d\d\eZ@Gd]d^d^eZAGd_d`d`eZBGdadbdbe,ZCgdcZDdS)dz< Exceptions and errors for use in twisted.internet modules. N)Version) deprecatec@"eZdZdZZdefddZdS) BindErrorz)An error occurred binding to an interfacereturncC,|j}|jrd|d|j}d|}|SNz{}: {} %s.MESSAGEargsformatjoinselfsr8/usr/lib/python3/dist-packages/twisted/internet/error.py__str__ zBindError.__str__N__name__ __module__ __qualname____doc__r strrrrrrrrc@s&eZdZdZddZdefddZdS)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||||||_||_||_dSN)r__init__ interfaceport socketError)rr!r"r#rrrr &s zCannotListenError.__init__rcCs|jpd}d||j|jS)NanyzCouldn't listen on {}:{}: {}.)r!rr"r#)rifacerrrr,s  zCannotListenError.__str__N)rrrrr rrrrrrrs rc@eZdZdZdS)MulticastJoinErrorz6 An attempt to join a multicast group failed. Nrrrrrrrrr'3r'c@r)MessageLengthErrorzMessage is too long to sendrcCrrr rrrrr<rzMessageLengthError.__str__Nrrrrrr*9rr*c@r)DNSLookupErrorzDNS lookup failedrcCrrr rrrrrGrzDNSLookupError.__str__Nrrrrrr+Drr+c@r&)ConnectInProgressErrorz3A connect operation was started and isn't done yet.Nr(rrrrr,Or)r,c@s,eZdZdZZd ddZdefddZdS) ConnectErrorz"An error occurred while connectingNcCs||_t||dSr)osError Exceptionr )rr/stringrrrr YszConnectError.__init__rcCsF|j}|jr|d|j}|jdr|d|jd}d|}|S)N: rr )r r/r rrrrr]s zConnectError.__str__)Nr.)rrrrr r rrrrrrr-Vs r-c@eZdZdZZdS)ConnectBindErrorz Couldn't bindNrrrrr rrrrr4g r4c@r3)UnknownHostErrorzHostname couldn't be looked upNr5rrrrr7kr6r7c@r3) NoRouteErrorzNo route to hostNr5rrrrr8or6r8c@r3)ConnectionRefusedErrorz$Connection was refused by other sideNr5rrrrr9sr6r9c@r3)TCPTimedOutErrorzTCP connection timed outNr5rrrrr:wr6r:c@r3) BadFileErrorz$File used for UNIX socket is no goodNr5rrrrr;{r6r;c@r3)ServiceNameUnknownErrorz%Service name given as port is unknownNr5rrrrr<r6r<c@r3) UserErrorzUser aborted connectionNr5rrrrr=r6r=c@r3) TimeoutErrorz&User timeout caused connection failureNr5rrrrr>r6r>c@r3)SSLErrorzAn SSL error occurredNr5rrrrr?r6r?c@r3) VerifyErrorz:Could not verify something that was supposed to be signed.Nr5rrrrr@r6r@c@r3)PeerVerifyErrorz#The peer rejected our verify error.Nr5rrrrrAr6rAc@r3)CertificateErrorzThe Port was not listening when it was asked to stop listeningrcCrrr rrrrrrrzNotListeningError.__str__Nrrrrrriorric@r&)ReactorNotRunningzJ Error raised when trying to stop a reactor which is not running. Nr(rrrrrjzr)rjc@r&)ReactorNotRestartablezF Error raised when trying to run a reactor which was stopped. Nr(rrrrrkr)rkc@r&)ReactorAlreadyRunningzG Error raised when trying to start the reactor multiple times. Nr(rrrrrlr)rlc@r&)ReactorAlreadyInstalledErrorzE Could not install reactor because one is already installed. Nr(rrrrrmr)rmc@eZdZdZddZdS)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)r0r address)rrprrrr s  z!ConnectingCancelledError.__init__Nrrrrr rrrrro roc@r&) NoProtocolz An C{Exception} that will be raised when the factory given to a L{IStreamClientEndpoint} returns L{None} from C{buildProtocol}. Nr(rrrrrsr)rsc@r&)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(rrrrrtr)rtc@r&)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(rrrrrur)ruc@r&)AlreadyListenedzd An attempt was made to listen on a file descriptor which can only be listened on once. Nr(rrrrrvr)rvc@rn)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)rpmessage)rrprxrrrr s zInvalidAddressError.__init__Nrqrrrrrwrrrw)(rrr'r*r+r,r-r4r7r8r9r:r;r<r=r>r?r@rArBrNrOrPrXrZr\r]r^rarfrgrhrirjrlrmrortrurw)ErrH incrementalrtwisted.pythonrr0rrr'r*IOErrorr+r,r-r4r7r8r9r:r;r<r=r>r?r@rArBerrno ENETUNREACH ECONNREFUSED ETIMEDOUTrIrGrCWSAENETUNREACH ImportErrorrNrOrPrWrXrYrZrFr\r]Warningr^deprecatedModuleAttributerrarfrg RuntimeErrorrhrirjrkrlAssertionErrorrmrorsrtrurvrw__all__rrrrs               $