Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/filelock/__pycache__/ |
Upload File : |
o ;�br � @ sb d dl mZ d dlZd dlZd dlmZmZmZ ddlm Z ddl mZ G dd� de �ZdgZ dS ) � )�annotationsN)�EACCES�EEXIST�ENOENT� )�BaseFileLock)�raise_on_exist_ro_filec @ s$ e Zd ZdZd dd�Zd dd�ZdS ) �SoftFileLockz.Simply watches the existence of the lock file.�return�Nonec C s� t | j� tjtjB tjB tjB }z t�| j|�}W n8 tyR } z,|j t kr(n|j tkr.� |j tkr@t jdkrG� W Y d }~d S W Y d }~d S W Y d }~d S d }~ww || _d S )N�win32)r � _lock_file�os�O_WRONLY�O_CREAT�O_EXCL�O_TRUNC�open�OSError�errnor r r �sys�platform� _lock_file_fd)�self�mode�fd� exception� r �0/usr/lib/python3/dist-packages/filelock/_soft.py�_acquire s. ���� ��� zSoftFileLock._acquirec C s: t �| j� d | _z t �| j� W d S ty Y d S w )N)r �closer �remover r )r r r r �_release$ s �zSoftFileLock._releaseN)r r )�__name__� __module__�__qualname__�__doc__r r"