sG+' . d dl mZ G d de ZdS ) )BytesIOc 8 e Zd ZdZd Zd Zd Zd Zd dZd Z dS )
CallbackFileWrapperav
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.
c H t | _ || _ || _ d S N)r _CallbackFileWrapper__buf_CallbackFileWrapper__fp_CallbackFileWrapper__callback)selffpcallbacks /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/cachecontrol/filewrapper.py__init__zCallbackFileWrapper.__init__ s YY
" c L | d }t || S )Nr )__getattribute__getattr)r namer s r __getattr__zCallbackFileWrapper.__getattr__ s(
"
"#=
>
>r4 r c ~ | j j d u S # t $ r Y nw xY w | j j S # t $ r Y nw xY wdS )NF)r r AttributeErrorclosedr s r __is_fp_closedz"CallbackFileWrapper.__is_fp_closed! sm 9<4'' D 9## D
us
-
::c z | j r,| | j d | _ d S r )r
r getvaluer s r _closezCallbackFileWrapper._close2 s9 ? 3OODJ//11222 r Nc | j | }| j | | r| |S r )r readr write"_CallbackFileWrapper__is_fp_closedr r amtdatas r r zCallbackFileWrapper.read= sQ y~~c""
KKMMMr c | j | }|dk r|dk r|S | j | | r| |S )N s
)r
_safe_readr r r! r r" s r r' zCallbackFileWrapper._safe_readE sk y##C((!88 K
KKMMMr r )
__name__
__module____qualname____doc__r r r! r r r' r r r r s} # # #
!
!
! " r r N)ior objectr r, r r