Server IP : 184.107.3.203 / Your IP : 216.73.216.51 Web Server : Apache System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64 User : adminteladeoro ( 1015) PHP Version : 8.2.28 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/lib/python3.6/site-packages/pip/_vendor/lockfile/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
3 �Pf8 � @ sL d dl mZ d dlZd dlZddlmZmZmZmZm Z G dd� de�Z dS )� )�absolute_importN� )�LockBase� NotLocked� NotMyLock�LockTimeout� AlreadyLockedc @ sD e Zd ZdZddd�Zddd�Zdd � Zd d� Zdd � Zdd� Z dS )�SymlinkLockFilez'Lock access to a file using symlink(2).TNc C s( t j| |||� tjj| j�d | _d S )Nr )r �__init__�os�path�split�unique_name)�selfr Zthreaded�timeout� r �%/usr/lib/python3.6/symlinklockfile.pyr s zSymlinkLockFile.__init__c C s� |d k r|n| j }tj� }|d k r2|dkr2||7 }x�ytj| j| j� W nt tk r� | j� rdd S |d k r�tj� |kr�|dkr�td| j ��nt d| j ��tj|d k r�|d nd� Y q4X d S q4W d S )Nr z&Timeout waiting to acquire lock for %sz%s is already locked� g�������?)r �timer �symlinkr � lock_file�OSError�i_am_lockingr r r Zsleep)r r Zend_timer r r �acquire s$ zSymlinkLockFile.acquirec C s>