관리-도구
편집 파일: symlinklockfile.cpython-311.pyc
� N�Dg8 � �Z � d dl mZ d dlZd dlZddlmZmZmZmZm Z G d� de� � Z dS )� )�absolute_importN� )�LockBase� NotLocked� NotMyLock�LockTimeout� AlreadyLockedc �: � e Zd ZdZd d�Zdd�Zd� Zd� Zd� Zd � Z dS )�SymlinkLockFilez'Lock access to a file using symlink(2).TNc � � t j | |||� � t j � | j � � d | _ d S )Nr )r �__init__�os�path�split�unique_name)�selfr �threaded�timeouts �x/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/lockfile/symlinklockfile.pyr zSymlinkLockFile.__init__ s= � ���$��h��8�8�8��7�=�=��)9�:�:�1�=����� c � � |�|n| j }t j � � }|�|dk r||z } t j | j | j � � d S # t $ r� | � � � rY d S |�Kt j � � |k r4|dk rt d| j z � � �t d| j z � � �t j |�|dz nd� � Y nw xY w��)Nr Tz&Timeout waiting to acquire lock for %sz%s is already locked� g�������?)r �timer �symlinkr � lock_file�OSError�i_am_lockingr r r �sleep)r r �end_times r �acquirezSymlinkLockFile.acquire s' � � %�0�'�'�d�l���9�;�;����7�Q�;�;����H� � �� �4�+�T�^�<�<�<�&