Your IP : 18.222.161.119


Current Path : /opt/alt/python39/lib64/python3.9/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/urllib/__pycache__/error.cpython-39.pyc

a

R�fH
�@sNdZddlZgd�ZGdd�de�ZGdd�deejj�ZGdd	�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||_dS�N)�args�reason�filename)�selfrr�r
�1/opt/alt/python39/lib64/python3.9/urllib/error.py�__init__szURLError.__init__cCs
d|jS)Nz<urlopen error %s>)r�r	r
r
r�__str__szURLError.__str__)N)�__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 returncCs:||_||_||_||_||_|dur6|�||||�dSr)�code�msg�hdrs�fpr�_HTTPError__super_init)r	Zurlrrrrr
r
rr'szHTTPError.__init__cCsd|j|jfS)NzHTTP Error %s: %s�rrr
r
r
rr4szHTTPError.__str__cCsd|j|jfS)Nz<HTTPError %s: %r>rr
r
r
r�__repr__7szHTTPError.__repr__cCs|jSr)rr
r
r
rr<szHTTPError.reasoncCs|jSr�rr
r
r
r�headers@szHTTPError.headerscCs
||_dSrr)r	rr
r
rrDsN)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KszContentTooShortError.__init__N)rrrrrr
r
r
rrIsr)
rZurllib.responser�__all__�OSErrorrrrrrr
r
r
r�<module>s

&

?>