%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/urllib/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/urllib/__pycache__/error.cpython-312.pyc

�

���fo	���dZddlZddlZgd�ZGd�de�ZGd�deejj�Z	Gd�d	e�Z
y)
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��eZdZdd�Zd�Zy)rNc�6�|f|_||_|�||_yy�N)�args�reason�filename)�selfr
rs   �#/usr/lib/python3.12/urllib/error.py�__init__zURLError.__init__s$���G��	������$�D�M� �c� �d|jzS)Nz<urlopen error %s>)r
�rs r
�__str__zURLError.__str__s��#�d�k�k�1�1rr)�__name__�
__module__�__qualname__rr�rr
rrs��%�2rrc��eZdZdZej
jjZd�Zd�Z	d�Z
ed��Zed��Z
e
jd��Z
y)	rzBRaised when HTTP error occurs, but also acts like non-error returnc��||_||_||_||_||_|�tj�}|j||||�yr)�code�msg�hdrs�fpr�io�BytesIO�_HTTPError__super_init)r�urlrrrrs      r
rzHTTPError.__init__'sI����	������	������
�
�:�����B����"�d�C��.rc�:�d|j�d|j��S)NzHTTP Error �: �rrrs r
rzHTTPError.__str__1s��&*�i�i����:�:rc�<�d|j�d|j�d�S)Nz<HTTPError r"�>r#rs r
�__repr__zHTTPError.__repr__4s��'+�y�y�$�(�(�;�;rc��|jSr)rrs r
r
zHTTPError.reason9s���x�x�rc��|jSr�rrs r
�headerszHTTPError.headers=s���y�y�rc��||_yrr))rr*s  r
r*zHTTPError.headersAs	����	rN)rrr�__doc__�urllib�response�
addinfourlrrrr&�propertyr
r*�setterrrr
rr#si��L��?�?�-�-�6�6�L�/�;�<�
��������
�^�^���rrc��eZdZdZd�Zy)rzDException raised when downloaded size does not match content-length.c�>�tj||�||_yr)rr�content)r�messager4s   r
rzContentTooShortError.__init__Hs�����$��(���rN)rrrr,rrrr
rrFs
��N�rr)r,r�urllib.responser-�__all__�OSErrorrr.r/rrrrr
�<module>r9sH���
��
;��
2�w�
2�  ��&�/�/�4�4� �F�8�r

Zerion Mini Shell 1.0