Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/pip/_vendor/lockfile/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyc

�
��abc@`s�ddlmZmZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
defd��YZdS(i(tabsolute_importtdivisionNi(tLockBaset
LockFailedt	NotLockedt	NotMyLocktLockTimeoutt
AlreadyLockedt
MkdirLockFilecB`sMeZdZedd�Zdd�Zd�Zd�Zd�Z	d�Z
RS(s"Lock file by creating a directory.cC`sKtj||||�tjj|jd|j|j|jf�|_	dS(ss
        >>> lock = MkdirLockFile('somefile')
        >>> lock = MkdirLockFile('somefile', threaded=False)
        s%s.%s%sN(
Rt__init__tostpathtjoint	lock_filethostnamettnametpidtunique_name(tselfRtthreadedttimeout((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyR	s
	cC`s{|dk	r|n|j}tj�}|dk	rL|dkrL||7}n|dkrad}ntd|d�}xtrvytj|j�Wn�tk
rXt	j
�d}|jtjkrBtj
j|j�r�dS|dk	r2tj�|kr2|dkrtd|j
��q2td|j
��ntj|�qstd|j��qwXt|jd�j�dSqwWdS(	Nig�������?i
is&Timeout waiting to acquire lock for %ss%s is already lockedsfailed to create %stwb(tNoneRttimetmaxtTrueR
tmkdirR
tOSErrortsystexc_infoterrnotEEXISTRtexistsRRRtsleepRtopentclose(RRtend_timetwaitterr((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pytacquires2
		
cC`sq|j�s"td|j��n+tjj|j�sMtd|j��ntj|j�tj|j	�dS(Ns%s is not lockeds%s is locked, but not by me(
t	is_lockedRRR
R RRtunlinktrmdirR
(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pytreleaseAscC`stjj|j�S(N(R
RR R
(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyR(IscC`s|j�otjj|j�S(N(R(R
RR R(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyti_am_lockingLscC`shtjj|j�rdx9tj|j�D]%}tjtjj|j|��q(Wtj|j�ndS(N(R
RR R
tlistdirR)RR*(Rtname((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyt
break_lockPs#N(t__name__t
__module__t__doc__RRR	R'R+R(R,R/(((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyRs
&			(t
__future__RRRR
RRtRRRRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyt<module>s.

Hacked By AnonymousFox1.0, Coded By AnonymousFox