Viewing File: /usr/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/symlinklockfile.cpython-36.pyc

3

aj8
@sLddlmZddlZddlZddlmZmZmZmZm	Z	GdddeZ
dS))absolute_importN)LockBase	NotLocked	NotMyLockLockTimeout
AlreadyLockedc@sDeZdZdZdddZdddZdd	Zd
dZdd
ZddZ	dS)SymlinkLockFilez'Lock access to a file using symlink(2).TNcCs(tj||||tjj|jd|_dS)Nr)r__init__ospathsplitunique_name)selfrZthreadedtimeoutr%/usr/lib/python3.6/symlinklockfile.pyr

szSymlinkLockFile.__init__cCs|dk	r|n|j}tj}|dk	r2|dkr2||7}xytj|j|jWnttk
r|jrddS|dk	rtj|kr|dkrtd|j	nt
d|j	tj|dk	r|dndYq4XdSq4WdS)Nrz&Timeout waiting to acquire lock for %sz%s is already locked
g?)rtimersymlinkr	lock_fileOSErrori_am_lockingrrrZsleep)rrZend_timerrracquires$
 zSymlinkLockFile.acquirecCs>|jstd|jn|js.td|jtj|jdS)Nz%s is not lockedz%s is locked, but not by me)	is_lockedrrrrrunlinkr)rrrrrelease6s
zSymlinkLockFile.releasecCstjj|jS)N)rrislinkr)rrrrr=szSymlinkLockFile.is_lockedcCs tjj|jotj|j|jkS)N)rrrrreadlinkr)rrrrr@szSymlinkLockFile.i_am_lockingcCstjj|jrtj|jdS)N)rrrrr)rrrr
break_lockDszSymlinkLockFile.break_lock)TN)N)
__name__
__module____qualname____doc__r
rrrrrrrrrr	
s

#r	)Z
__future__rrrrrrrrr	rrrr<module>s
Back to Directory File Manager