Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.138.100.186
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : symlinklockfile.cpython-36.pyc
3

���e8
�@sLddlmZddlZddlZddlmZmZmZmZm	Z	Gdd�de�Z
dS)�)�absolute_importN�)�LockBase�	NotLocked�	NotMyLock�LockTimeout�
AlreadyLockedc@sDeZdZdZddd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�SymlinkLockFilez'Lock access to a file using symlink(2).TNcCs(tj||||�tjj|j�d|_dS)Nr)r�__init__�os�path�split�unique_name)�selfrZthreaded�timeout�r�%/usr/lib/python3.6/symlinklockfile.pyr

szSymlinkLockFile.__init__cCs�|dk	r|n|j}tj�}|dk	r2|dkr2||7}x�ytj|j|j�Wnttk
r�|j�rddS|dk	r�tj�|kr�|dkr�td|j	��nt
d|j	��tj|dk	r�|dnd�Yq4XdSq4WdS)Nrz&Timeout waiting to acquire lock for %sz%s is already locked�
g�������?)r�timer�symlinkr�	lock_file�OSError�i_am_lockingrrrZsleep)rrZend_timerrr�acquires$
 zSymlinkLockFile.acquirecCs>|j�std|j��n|j�s.td|j��tj|j�dS)Nz%s is not lockedz%s is locked, but not by me)�	is_lockedrrrrr�unlinkr)rrrr�release6s
zSymlinkLockFile.releasecCstjj|j�S)N)rr�islinkr)rrrrr=szSymlinkLockFile.is_lockedcCs tjj|j�otj|j�|jkS)N)rrrr�readlinkr)rrrrr@szSymlinkLockFile.i_am_lockingcCstjj|j�rtj|j�dS)N)rrrrr)rrrr�
break_lockDszSymlinkLockFile.break_lock)TN)N)
�__name__�
__module__�__qualname__�__doc__r
rrrrrrrrrr	
s

#r	)Z
__future__rrr�rrrrrr	rrrr�<module>s
© 2025 GrazzMean