Your IP : 18.223.241.235


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyc

�
�Rec@s�ddlZddlZddlmZddlmZddlmZyeWne	k
roe
efZnXd�Zdefd��YZ
d	�ZdS(
i����N(tdedenti(t	BaseCache(tCacheControllercCs�tj}|tjtjBO}ttd�r<|tjO}nttd�r[|tjO}nytj|�Wntt	fk
r�nXtj
|||�}ytj|d�SWntj|��nXdS(Nt
O_NOFOLLOWtO_BINARYtwb(
tostO_WRONLYtO_CREATtO_EXCLthasattrRRtremovetIOErrortOSErrortopentfdopentclose(tfilenametfmodetflagstfd((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyt_secure_open_writes 	
t	FileCachecBsSeZeddddd�Zed��Zd�Zd�Zd�Z	d�Z
RS(	i�i�c
Cs�|dk	r'|dk	r'td��ny$ddlm}ddlm}Wn)tk
rvtd�}	t|	��n%X|r�|}n|dkr�|}n||_||_	||_
||_||_dS(Ns/Cannot use use_dir_lock and lock_class togetheri����(tLockFile(t
MkdirLockFiles�
            NOTE: In order to use the FileCache you must have
            lockfile installed. You can install it via pip:
              pip install lockfile
            (
tNonet
ValueErrortlockfileRtlockfile.mkdirlockfileRtImportErrorRt	directorytforevertfilemodetdirmodet
lock_class(
tselfRRR R!tuse_dir_lockR"RRtnotice((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyt__init__:s$

							cCstj|j��j�S(N(thashlibtsha224tencodet	hexdigest(tx((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyR)ascCs<|j|�}t|d �|g}tjj|j|�S(Ni(R)tlistRtpathtjoinR(R#tnamethashedtparts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyt_fnescCsN|j|�}y&t|d��}|j�SWdQXWntk
rIdSXdS(Ntrb(R2RtreadtFileNotFoundErrorR(R#tkeyR/tfh((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pytgetls
c
Cs�|j|�}y#tjtjj|�|j�Wnttfk
rKnX|j|��2}t	|j|j
��}|j|�WdQXWdQXdS(N(R2RtmakedirsR-tdirnameR!RR
R"RR twrite(R#R6tvalueR/tlockR7((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pytsetus#cCsD|j|�}|js@ytj|�Wq@tk
r<q@XndS(N(R2RRRR5(R#R6R/((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pytdelete�s	
N(t__name__t
__module__tFalseRR&tstaticmethodR)R2R8R>R?(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyR8s 				cCstj|�}|j|�S(s\Return the file cache path based on the URL.

    This does not ensure the file exists!
    (Rt	cache_urlR2(turlt	filecacheR6((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyturl_to_file_path�s(R'RttextwrapRtcacheRt
controllerRR5t	NameErrorRR
RRRG(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyt<module>s
	)T

?>