Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyc

ó
“tÆ_c@s*ddlmZdefd„ƒYZdS(iÿÿÿÿ(tBytesIOtCallbackFileWrappercBsGeZdZd„Zd„Zd„Zd„Zdd„Zd„Z	RS(sv
    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.
    cCs"tƒ|_||_||_dS(N(Rt_CallbackFileWrapper__buft_CallbackFileWrapper__fpt_CallbackFileWrapper__callback(tselftfptcallback((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyt__init__s	cCs|jdƒ}t||ƒS(NR(t__getattribute__tgetattr(RtnameR((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyt__getattr__s	cCsNy|jjdkSWntk
r'nXy|jjSWntk
rInXtS(N(RRtNonetAttributeErrortclosedtFalse(R((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyt__is_fp_closed!s

cCs/|jr"|j|jjƒƒnd|_dS(N(RRtgetvalueR
(R((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyt_close2s	cCs?|jj|ƒ}|jj|ƒ|jƒr;|jƒn|S(N(RtreadRtwritet"_CallbackFileWrapper__is_fp_closedR(Rtamttdata((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyR=s

cCs[|jj|ƒ}|dkr.|dkr.|S|jj|ƒ|jƒrW|jƒn|S(Nis
(Rt
_safe_readRRRR(RRR((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyREs
N(
t__name__t
__module__t__doc__RRRRR
RR(((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyRs
				N(tioRtobjectR(((sU/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.pyt<module>s
Back to Directory File Manager