관리-도구
편집 파일: _soft.cpython-37.pyc
B ���ar � @ 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 }yt�| j|�}W nR tk r� } z4|j t krRn$|j tkr`� n|j tkrvt jdkrv� W d d }~X Y nX || _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 �?/opt/alt/python37/lib/python3.7/site-packages/filelock/_soft.py�_acquire s zSoftFileLock._acquirec C s<