File: //lib/python3.9/site-packages/filelock/__pycache__/_soft.cpython-39.pyc
a
]��dr � @ 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 ZdZdd�dd�Zdd�dd�ZdS ) �SoftFileLockz.Simply watches the existence of the lock file.�None)�returnc
C s� t | j� tjtjB tjB tjB }zt�| j|�}W nT ty� } z<|j t
krPn$|j tkr^� n|j tkrtt
jdkrt� W Y d }~nd }~0 0 || _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 �2/usr/lib/python3.9/site-packages/filelock/_soft.py�_acquire s&