bg$hdZddlZddlZddlmZmZmZmZmZddl m Z ddl m Z  ddl Z e jZn#e$rdxZ ZYnwxYwer ddlmZmZmZmZndxZxZZdZGd d eZGd d eZGd deZGddeZGddeZGddeZGddeZGddeeZGddeZ Gdde Z!Gdde Z"Gdd eZ#Gd!d"e#Z$Gd#d$e#ej%Z&Gd%d&e#Z'Gd'd(eZ(Gd)d*ee)Z*Gd+d,e Z+e #e j,fZ-e+e j,fZ.e j/fZ0e+e j/fZ1ne2Z-e+e)fZ.e2Z0e+fZ1Gd-d.ge1RZ3Gd/d0ge.RZ4dS)1zHTTP related errors.N) TYPE_CHECKINGAnyOptionalTupleUnion)RawResponseMessage) LooseHeaders)ClientResponse ConnectionKey Fingerprint RequestInfo) ClientErrorClientConnectionError ClientOSErrorClientConnectorErrorClientProxyConnectionErrorClientSSLErrorClientConnectorSSLErrorClientConnectorCertificateErrorServerConnectionErrorServerTimeoutErrorServerDisconnectedErrorServerFingerprintMismatchClientResponseErrorClientHttpProxyErrorWSServerHandshakeErrorContentTypeErrorClientPayloadError InvalidURLceZdZdZdS)rz(Base class for client connection errors.N__name__ __module__ __qualname____doc__P/opt/cloudlinux/venv/lib64/python3.11/site-packages/aiohttp/client_exceptions.pyrr-s2222r(rceZdZdZddddddedeedfdeed eed e d ee d dfd Z d e fdZ d e fdZ ed efdZejded dfdZdS)raBase class for exceptions that occur after getting a response. request_info: An instance of RequestInfo. history: A sequence of responses, if redirects occurred. status: HTTP status code. message: Error message. headers: Response headers. N)codestatusmessageheaders request_infohistory.r,r-r.r/returnc||_|-|tdtjdtd|||_n|||_nd|_||_||_||_||f|_ dS)NzSBoth code and status arguments are provided; code is deprecated, use status insteadz/code argument is deprecated, use status instead stacklevelr) r0 ValueErrorwarningswarnDeprecationWarningr-r.r/r1args)selfr0r1r,r-r.r/s r)__init__zClientResponseError.__init__;s)  ! = MA"       DKK  DKKDK   !7+ r(cXd|j|j|jjS)Nz{}, message={!r}, url={!r})formatr-r.r0real_urlr<s r)__str__zClientResponseError.__str__\s-+22 K L   &   r(c|jd|j}|jdkr |d|jz }|jdkr |d|jz }|j |d|jz }t |jd|dS) Nz, rz , status=r+z , message=z , headers=())r0r1r-r.r/typer#)r<r;s r)__repr__zClientResponseError.__repr__cs#9999 ;!   / // /D <2   111 1D < # 111 1Dt**%//////r(cHtjdtd|jSNz/code property is deprecated, use status insteadr4r5r8r9r:r-rAs r)r,zClientResponseError.codems. =     {r(valuecLtjdtd||_dSrIrJ)r<rKs r)r,zClientResponseError.codevs1 =      r()r#r$r%r&rrr rintstrr r=rBrGpropertyr,setterr'r(r)rr1s3# $*.,,,!,~s*+, sm ,  ,,,', ,,,,B     0#0000cX [#$[r(rceZdZdZdS)rzContentType found is not valid.Nr"r'r(r)rrs))))r(rceZdZdZdS)rz!websocket server handshake error.Nr"r'r(r)rrs++++r(rceZdZdZdS)rzHTTP proxy error. Raised in :class:`aiohttp.connector.TCPConnector` if proxy responds with status other than ``200 OK`` on ``CONNECT`` request. Nr"r'r(r)rrsr(rceZdZdZdS)TooManyRedirectsz%Client was redirected too many times.Nr"r'r(r)rUrUs////r(rUceZdZdZdS)rz$Base class for client socket errors.Nr"r'r(r)rrs....r(rceZdZdZdS)rzOSError error.Nr"r'r(r)rrsr(rceZdZdZdededdffd ZedefdZede fdZ ede e fd Z edeeed ffd Zde fd ZejZxZS) rzClient connector error. Raised in :class:`aiohttp.connector.TCPConnector` if a connection can not be established. connection_keyos_errorr2Nc||_||_t|j|j||f|_dSN) _conn_key _os_errorsuperr=errnostrerrorr;)r<rYrZ __class__s r)r=zClientConnectorError.__init__s@'! ):;;;#X. r(c|jSr\)r^rAs r)rZzClientConnectorError.os_errors ~r(c|jjSr\r]hostrAs r)rfzClientConnectorError.host ~""r(c|jjSr\r]portrAs r)rjzClientConnectorError.portrgr(r c|jjSr\)r]sslrAs r)rlzClientConnectorError.ssls ~!!r(cZd||jdurdn|j|jS)Nz6Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]Tdefaultr?rlrarAs r)rBzClientConnectorError.__str__s5GNN tx4//))TXt}   r()r#r$r%r&r OSErrorr=rOrZrNrfrrMrjr SSLContextboolrlrB BaseException __reduce__ __classcell__rbs@r)rrs! /}//D////// 'X#c###X##hsm###X#"U:t]:;"""X"     )JJJJJr(rceZdZdZdS)rzProxy connection error. Raised in :class:`aiohttp.connector.TCPConnector` if connection to proxy can not be established. Nr"r'r(r)rrsr(rc\eZdZdZdedededdffd ZedefdZ defd Z xZ S) UnixClientConnectorErrorzUnix connector error. Raised in :py:class:`aiohttp.connector.UnixConnector` if connection to unix socket can not be established. pathrYrZr2NcZ||_t||dSr\)_pathr_r=)r<rzrYrZrbs r)r=z!UnixClientConnectorError.__init__s,  22222r(c|jSr\)r|rAs r)rzzUnixClientConnectorError.paths zr(cZd||jdurdn|j|jS)Nz4Cannot connect to unix socket {0.path} ssl:{1} [{2}]TrnrorAs r)rBz UnixClientConnectorError.__str__s5ELL tx4//))TXt}   r() r#r$r%r&rNr rpr=rOrzrBrurvs@r)ryrys 33)63BI3 333333 cX         r(ryceZdZdZdS)rzServer connection errors.Nr"r'r(r)rrs####r(rc6eZdZdZddeeedfddfdZdS)rzServer disconnected.Nr.r2c,|d}|f|_||_dS)NzServer disconnected)r;r.)r<r.s r)r=z ServerDisconnectedError.__init__s ?+GJ  r(r\)r#r$r%r&rr rNr=r'r(r)rrsO&8#t&C DPTr(rceZdZdZdS)rzServer timeout error.Nr"r'r(r)rrsr(rc :eZdZdZdededededdf dZdefd ZdS) rz4SSL certificate does not match expected fingerprint.expectedgotrfrjr2NcT||_||_||_||_||||f|_dSr\)rrrfrjr;)r<rrrfrjs r)r=z"ServerFingerprintMismatch.__init__s2    sD$/ r(cpd|jj|j|j|j|jS)Nz/<{} expected={!r} got={!r} host={!r} port={!r}>)r?rbr#rrrfrjrAs r)rGz"ServerFingerprintMismatch.__repr__s2@GG N #T]DHdi   r() r#r$r%r&bytesrNrMr=rGr'r(r)rrsl>>00U0#0S0T0000 #      r(rceZdZdZdS)rzResponse payload error.Nr"r'r(r)rrs!!!!r(rcTeZdZdZdeddffd ZedefdZdefdZ xZ S)r zbInvalid URL. URL used for fetching is malformed, e.g. it doesn't contains host part. urlr2NcJt|dSr\)r_r=)r<rrbs r)r=zInvalidURL.__init__s# r(c|jdS)Nr)r;rAs r)rzInvalidURL.urlsy|r(c2d|jjd|jdS)N< >)rbr#rrAs r)rGzInvalidURL.__repr__s"84>*88TX8888r() r#r$r%r&rr=rOrrNrGrurvs@r)r r sCD SX9#99999999r(r ceZdZdZdS)rzBase error for ssl.*Errors.Nr"r'r(r)rrs%%%%r(rceZdZdZdS)rzResponse ssl error.Nr"r'r(r)rr7sr(rceZdZdZdededdfdZedefdZede fdZ ede e fd Z edefd Zde fd ZdS) rzResponse certificate error.rYcertificate_errorr2Nc4||_||_||f|_dSr\)r]_certificate_errorr;)r<rYrs r)r=z(ClientConnectorCertificateError.__init__>s$("3#%67 r(c|jSr\)rrAs r)rz1ClientConnectorCertificateError.certificate_errorEs &&r(c|jjSr\rerAs r)rfz$ClientConnectorCertificateError.hostIrgr(c|jjSr\rirAs r)rjz$ClientConnectorCertificateError.portMrgr(c|jjSr\)r]is_sslrAs r)rlz#ClientConnectorCertificateError.sslQs ~$$r(c,d|S)Nz{Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{0.certificate_error.__class__.__name__}: {0.certificate_error.args}])r?rAs r)rBz'ClientConnectorCertificateError.__str__Us **0&,, r()r#r$r%r&r Exceptionr=rOrrNrfrrMrjrrrlrBr'r(r)rr;s%%8+8@I8 8888'9'''X'#c###X##hsm###X#%T%%%X%       r(r)5r&asyncior8typingrrrrr http_parserr typedefsr rlrq ImportError client_reqrepr r r r__all__rrrrrrrUrrprrrryrr TimeoutErrorrrrr7r rCertificateError cert_errorscert_errors_basesSSLError ssl_errorsssl_error_basestuplerrr'r(r)rs==============++++++""""""JJJJJC***8VVVVVVVVVVVVV377K7.= ,33333)333LLLLL+LLL^*********,,,,,0,,,.00000*000/////K///)7#*#*#*#*#*=#*#*#*L!5     3   .$$$$$1$$$3     .0D         5    """"""""99999j999,&&&&&)&&&?')K  ,J%s|4OO%''K J%'O      '8      s 2 >>