Hacked By AnonymousFox
�
�܋fl � � � d Z ddlmZmZmZ ddlmZ G d� de� � Z G d� de� � Z G d� d e� � Z G d
� de� � Z
[[[[dS )
a Response classes used by urllib.
The base class, addbase, defines a minimal file-like interface,
including read() and readline(). The typical response object is an
addinfourl instance, which defines an info() method that returns
headers and a geturl() method that returns the url.
� )�absolute_import�division�unicode_literals)�objectc �6 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z dS ) �addbasez(Base class for addinfo and addclosehook.c � � || _ | j j | _ | j j | _ t | j d� � r| j j | _ t | j d� � r| j j | _ d S d� | _ d S )N� readlines�filenoc � � d S �N� r � �q/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/future/backports/urllib/response.py�<lambda>z"addbase.__init__.<locals>.<lambda> s � �$� r )�fp�read�readline�hasattrr
r )�selfr s r �__init__zaddbase.__init__ sp � �����G�L�� ���(��
��4�7�K�(�(� /�!�W�.�D�N��4�7�H�%�%� '��'�.�D�K�K�K�&�,�D�K�K�Kr c �* � t | j � � S r
)�iterr �r s r �__iter__zaddbase.__iter__ s � � �D�G�}�}�r c �R � d| j j �dt | � � �d| j �d�S )N�<z at z whose fp = �>)� __class__�__name__�idr r s r �__repr__zaddbase.__repr__% s3 � � �-1�^�-D�-D�-D�-/��X�X�X�X�t�w�w�w�@� @r c � � | j r| j � � � d | _ d | _ d | _ d | _ d | _ d | _ d | _ d S r
)r �closer r r
r r �__next__r s r r$ z
addbase.close) sP � ��7� ��G�M�M�O�O�O������ ���
���������
���
�
�
r c �2 � | j �t d� � �| S )NzI/O operation on closed file)r �
ValueErrorr s r � __enter__zaddbase.__enter__4 s � ��7�?��;�<�<�<��r c �. � | � � � d S r
)r$ )r �type�value� tracebacks r �__exit__zaddbase.__exit__9 s � ��
�
�����r N)
r �
__module__�__qualname__�__doc__r r r"