AlkantarClanX12

Your IP : 18.221.27.56


Current Path : /opt/alt/python310/lib64/python3.10/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/urllib/__pycache__/error.cpython-310.pyc

o

6��fo	�@sVdZddlZddlZgd�ZGdd�de�ZGdd�deejj�Z	Gdd	�d	e�Z
dS)
a�Exception classes raised by urllib.

The base exception class is URLError, which inherits from OSError.  It
doesn't define any behavior of its own, but is the base class for all
exceptions defined in this package.

HTTPError is an exception class that is also a valid HTTP response
instance.  It behaves this way because HTTP protocol errors are valid
responses, with a status code, headers, and a body.  In some contexts,
an application may want to handle an exception like a regular
response.
�N)�URLError�	HTTPError�ContentTooShortErrorc@seZdZddd�Zdd�ZdS)rNcCs$|f|_||_|dur||_dSdS�N)�args�reason�filename)�selfrr�r
�3/opt/alt/python310/lib64/python3.10/urllib/error.py�__init__s

�zURLError.__init__cCs
d|jS)Nz<urlopen error %s>)r�r	r
r
r�__str__s
zURLError.__str__r)�__name__�
__module__�__qualname__rrr
r
r
rrs
rc@sXeZdZdZejjjZdd�Zdd�Z	dd�Z
edd	��Zed
d��Z
e
jdd��Z
d
S)rzBRaised when HTTP error occurs, but also acts like non-error returncCsB||_||_||_||_||_|durt��}|�||||�dSr)�code�msg�hdrs�fpr�io�BytesIO�_HTTPError__super_init)r	Zurlrrrrr
r
rr'szHTTPError.__init__cC�d|j|jfS)NzHTTP Error %s: %s�rrr
r
r
rr1�zHTTPError.__str__cCr)Nz<HTTPError %s: %r>rr
r
r
r�__repr__4rzHTTPError.__repr__cC�|jSr)rr
r
r
rr9�zHTTPError.reasoncCrr�rr
r
r
r�headers=rzHTTPError.headerscCs
||_dSrr)r	r r
r
rr As
N)rrr�__doc__�urllib�response�
addinfourlrrrr�propertyrr �setterr
r
r
rr#s



rc@seZdZdZdd�ZdS)rzDException raised when downloaded size does not match content-length.cCst�||�||_dSr)rr�content)r	�messager'r
r
rrHs
zContentTooShortError.__init__N)rrrr!rr
r
r
rrFsr)r!rZurllib.responser"�__all__�OSErrorrr#r$rrr
r
r
r�<module>s#