• File: client_exceptions.cpython-37.opt-1.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/client_exceptions.cpython-37.opt-1.pyc
  • Date Modified: 05/11/2022 10:20 AM
  • File size: 11.09 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

ka=$@sDdZddlZddlZddlmZmZmZmZmZddl	m
Z
ddlmZyddl
Z
e
jZWnek
rvdZ
ZYnXerddlmZmZmZmZndZZZdZGd	d
d
eZGdddeZGd
ddeZGdddeZGdddeZGdddeZGdddeZGdddeeZGdddeZ Gddde Z!Gddde Z"Gdd d eZ#Gd!d"d"e#Z$Gd#d$d$e#ej%Z&Gd%d&d&e#Z'Gd'd(d(eZ(Gd)d*d*ee)Z*Gd+d,d,e Z+e
dk	re
j,fZ-e+e
j,fZ.e
j/fZ0e+e
j/fZ1ne2Z-e+e)fZ.e2Z0e+fZ1Gd-d.d.fe1Z3Gd/d0d0fe.Z4dS)1zHTTP related errors.N)
TYPE_CHECKINGAnyOptionalTupleUnion)RawResponseMessage)LooseHeaders)ClientResponse
ConnectionKeyFingerprintRequestInfo)ClientErrorClientConnectionError
ClientOSErrorClientConnectorErrorClientProxyConnectionErrorClientSSLErrorClientConnectorSSLErrorClientConnectorCertificateErrorServerConnectionErrorServerTimeoutErrorServerDisconnectedErrorServerFingerprintMismatchClientResponseErrorClientHttpProxyErrorWSServerHandshakeErrorContentTypeErrorClientPayloadError
InvalidURLc@seZdZdZdS)rz(Base class for client connection errors.N)__name__
__module____qualname____doc__r$r$L/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/client_exceptions.pyr-src	@seZdZdZdddddeeedfeeeee	ee
ddddZe	d	d
dZe	d	dd
Z
eed	ddZejeddddZdS)rzYConnection error during reading response.

    request_info: instance of RequestInfo
    N)codestatusmessageheaders.)request_infohistoryr'r(r)r*returncCst||_|dk	r.|dk	rtdtjdtdd|dk	r>||_n|dk	rN||_nd|_||_||_||_||f|_	dS)NzSBoth code and status arguments are provided; code is deprecated, use status insteadz/code argument is deprecated, use status instead)
stacklevelr)
r+
ValueErrorwarningswarnDeprecationWarningr(r)r*r,args)selfr+r,r'r(r)r*r$r$r%__init__7s$
zClientResponseError.__init__)r-cCsd|j|j|jjS)Nz{}, message={!r}, url={!r})formatr(r)r+Zreal_url)r5r$r$r%__str__XszClientResponseError.__str__cCsv|jd|j}|jdkr,|d|j7}|jdkrF|d|j7}|jdk	r`|d|j7}t|jd|dS)	Nz, rz	, status=r&z
, message=z
, headers=())r+r,r(r)r*typer )r5r4r$r$r%__repr___s


zClientResponseError.__repr__cCstjdtdd|jS)Nz/code property is deprecated, use status insteadr.)r/)r1r2r3r()r5r$r$r%r'is
zClientResponseError.code)valuer-cCstjdtdd||_dS)Nz/code property is deprecated, use status insteadr.)r/)r1r2r3r()r5r=r$r$r%r'rs
)r r!r"r#r
rr
rintstrr	r6r8r<propertyr'setterr$r$r$r%r1s&
rc@seZdZdZdS)rzContentType found is not valid.N)r r!r"r#r$r$r$r%r|src@seZdZdZdS)rz!websocket server handshake error.N)r r!r"r#r$r$r$r%rsrc@seZdZdZdS)rzHTTP proxy error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
    proxy responds with status other than ``200 OK``
    on ``CONNECT`` request.
    N)r r!r"r#r$r$r$r%rsrc@seZdZdZdS)TooManyRedirectsz%Client was redirected too many times.N)r r!r"r#r$r$r$r%rBsrBc@seZdZdZdS)rz$Base class for client socket errors.N)r r!r"r#r$r$r$r%rsrc@seZdZdZdS)rzOSError error.N)r r!r"r#r$r$r$r%rsrcseZdZdZeeddfddZeedddZee	dd	d
Z
eeedddZ
eeeded
fdddZe	dddZejZZS)rzClient connector error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        connection to proxy can not be established.
    N)connection_keyos_errorr-cs,||_||_t|j|j||f|_dS)N)	_conn_key	_os_errorsuperr6errnostrerrorr4)r5rCrD)	__class__r$r%r6szClientConnectorError.__init__)r-cCs|jS)N)rF)r5r$r$r%rDszClientConnectorError.os_errorcCs|jjS)N)rEhost)r5r$r$r%rKszClientConnectorError.hostcCs|jjS)N)rEport)r5r$r$r%rLszClientConnectorError.portrcCs|jjS)N)rEssl)r5r$r$r%rMszClientConnectorError.sslcCs d||jdk	r|jnd|jS)Nz6Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]default)r7rMrI)r5r$r$r%r8szClientConnectorError.__str__)r r!r"r#rOSErrorr6r@rDr?rKrr>rLr
SSLContextboolrMr8
BaseException
__reduce__
__classcell__r$r$)rJr%rsrc@seZdZdZdS)rzProxy connection error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        connection to proxy can not be established.
    N)r r!r"r#r$r$r$r%rsrcsLeZdZdZeeeddfddZeedddZ	edd	d
Z
ZS)UnixClientConnectorErrorzUnix connector error.

    Raised in :py:class:`aiohttp.connector.UnixConnector`
    if connection to unix socket can not be established.
    N)pathrCrDr-cs||_t||dS)N)_pathrGr6)r5rVrCrD)rJr$r%r6sz!UnixClientConnectorError.__init__)r-cCs|jS)N)rW)r5r$r$r%rVszUnixClientConnectorError.pathcCs d||jdk	r|jnd|jS)Nz4Cannot connect to unix socket {0.path} ssl:{1} [{2}]rN)r7rMrI)r5r$r$r%r8sz UnixClientConnectorError.__str__)r r!r"r#r?rrOr6r@rVr8rTr$r$)rJr%rUsrUc@seZdZdZdS)rzServer connection errors.N)r r!r"r#r$r$r$r%rsrc@s,eZdZdZdeeedfddddZdS)rzServer disconnected.N)r)r-cCs|dkrd}|f|_||_dS)NzServer disconnected)r4r))r5r)r$r$r%r6sz ServerDisconnectedError.__init__)N)r r!r"r#rrr?r6r$r$r$r%rsrc@seZdZdZdS)rzServer timeout error.N)r r!r"r#r$r$r$r%rsrc@s4eZdZdZeeeeddddZedddZdS)	rz4SSL certificate does not match expected fingerprint.N)expectedgotrKrLr-cCs*||_||_||_||_||||f|_dS)N)rXrYrKrLr4)r5rXrYrKrLr$r$r%r6s
z"ServerFingerprintMismatch.__init__)r-cCsd|jj|j|j|j|jS)Nz/<{} expected={!r} got={!r} host={!r} port={!r}>)r7rJr rXrYrKrL)r5r$r$r%r<sz"ServerFingerprintMismatch.__repr__)	r r!r"r#bytesr?r>r6r<r$r$r$r%rsrc@seZdZdZdS)rzResponse payload error.N)r r!r"r#r$r$r$r%rsrcsHeZdZdZeddfddZeedddZedd	d
Z	Z
S)rzbInvalid URL.

    URL used for fetching is malformed, e.g. it doesn't contains host
    part.
    N)urlr-cst|dS)N)rGr6)r5r[)rJr$r%r6szInvalidURL.__init__)r-cCs
|jdS)Nr)r4)r5r$r$r%r[szInvalidURL.urlcCsd|jjd|jdS)N< >)rJr r[)r5r$r$r%r<szInvalidURL.__repr__)r r!r"r#rr6r@r[r?r<rTr$r$)rJr%rs
rc@seZdZdZdS)rzBase error for ssl.*Errors.N)r r!r"r#r$r$r$r%rsrc@seZdZdZdS)rzResponse ssl error.N)r r!r"r#r$r$r$r%r3src@s|eZdZdZeeddddZeedddZee	dd	d
Z
eeedddZ
eedd
dZe	dddZdS)rzResponse certificate error.N)rCcertificate_errorr-cCs||_||_||f|_dS)N)rE_certificate_errorr4)r5rCr_r$r$r%r6:sz(ClientConnectorCertificateError.__init__)r-cCs|jS)N)r`)r5r$r$r%r_Asz1ClientConnectorCertificateError.certificate_errorcCs|jjS)N)rErK)r5r$r$r%rKEsz$ClientConnectorCertificateError.hostcCs|jjS)N)rErL)r5r$r$r%rLIsz$ClientConnectorCertificateError.portcCs|jjS)N)rEZis_ssl)r5r$r$r%rMMsz#ClientConnectorCertificateError.sslcCs
d|S)Nz{Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{0.certificate_error.__class__.__name__}: {0.certificate_error.args}])r7)r5r$r$r%r8Qsz'ClientConnectorCertificateError.__str__)r r!r"r#r	Exceptionr6r@r_r?rKrr>rLrQrMr8r$r$r$r%r7sr)5r#Zasyncior1typingrrrrrZhttp_parserrZtypedefsr	rMrPImportErrorZ
client_reqrepr
rrr
__all__rarrrrrrBrrOrrrrUrrTimeoutErrorrrrr0rrZCertificateErrorZcert_errorsZcert_errors_basesZSSLErrorZ
ssl_errorsZssl_error_basestuplerrr$r$r$r%<module>sZ
K	&