Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/pip/_vendor/lockfile/
Upload File :
Current File : //lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyo

�
��abc@@spddlmZddlZddlZddlmZmZmZmZm	Z	m
Z
defd��YZdS(i(tabsolute_importNi(tLockBaset
LockFailedt	NotLockedt	NotMyLocktLockTimeoutt
AlreadyLockedtLinkLockFilecB@s>eZdZdd�Zd�Zd�Zd�Zd�ZRS(s�Lock access to a file using atomic property of link(2).

    >>> lock = LinkLockFile('somefile')
    >>> lock = LinkLockFile('somefile', threaded=False)
    cC@s~yt|jd�j�Wn$tk
r@td|j��nX|dk	rS|n|j}tj�}|dk	r�|dkr�||7}nx�tryyt	j
|j|j�Wn�tk
rqt	j
|j�j}|dkr�dS|dk	rKtj�|krKt	j|j�|dkr5td|j��qKtd|j��ntj|dk	rg|dpjd�q�XdSq�WdS(	Ntwbsfailed to create %siis&Timeout waiting to acquire lock for %ss%s is already lockedi
g�������?(topentunique_nametclosetIOErrorRtNonettimeoutttimetTruetostlinkt	lock_filetOSErrortstattst_nlinktunlinkRtpathRtsleep(tselfRtend_timetnlinks((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pytacquires0

	
'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_lockedRRRtexistsR
RRR(R((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pytrelease7scC@stjj|j�S(N(RRRR(R((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyR?scC@s:|j�o9tjj|j�o9tj|j�jdkS(Ni(RRRRR
RR(R((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyti_am_lockingBscC@s,tjj|j�r(tj|j�ndS(N(RRRRR(R((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyt
break_lockGsN(	t__name__t
__module__t__doc__R
RR RR!R"(((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyR
s&			(t
__future__RRRtRRRRRRR(((sE/usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyt<module>s.

Hacked By AnonymousFox1.0, Coded By AnonymousFox