Graybyt3 Was Here
Linux cloud.locucionar.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Apache
91.191.211.241
/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
pip
/
_vendor
/
cachecontrol
/
__pycache__
[ HOME ]
Exec
Submit
filewrapper.cpython-311.pyc
� #�Fh� � �d � d dl mZ d dlZd dlmZ d dlmZmZmZ erd dl m Z G d� d� � ZdS )� )�annotationsN)�NamedTemporaryFile)� TYPE_CHECKING�Any�Callable)�HTTPResponsec �D � e Zd ZdZdd�Zdd�Zdd�Zdd�Zddd�Zdd�Z dS )�CallbackFileWrappera Small wrapper around a fp object which will tee everything read into a buffer, and when that file is closed it will execute a callback with the contents of that buffer. All attributes are proxied to the underlying file object. This class uses members with a double underscore (__) leading prefix so as not to accidentally shadow an attribute. The data is stored in a temporary file until it is all available. As long as the temporary files directory is disk-based (sometimes it's a memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory pressure is high. For small files the disk usually won't be used at all, it'll all be in the filesystem memory cache, so there should be no performance impact. �fpr �callback�Callable[[bytes], None] | None�return�Nonec �N � t dd�� � | _ || _ || _ d S )Nzrb+T)�delete)r �_CallbackFileWrapper__buf�_CallbackFileWrapper__fp�_CallbackFileWrapper__callback)�selfr r s ��/builddir/build/BUILD/imunify360-venv-2.5.3/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/filewrapper.py�__init__zCallbackFileWrapper.__init__! s* � � (��d�;�;�;�� ��� �"����� �name�strr c �L � | � d� � }t ||� � S )Nr )�__getattribute__�getattr)r r r s r �__getattr__zCallbackFileWrapper.__getattr__( s( � � � "� "�#=� >� >���r�4� � � r �boolc � � | j j d u S # t $ r Y nw xY w | j j }|S # t $ r Y nw xY wdS )NF)r r �AttributeError�closed)r r"