관리-도구
편집 파일: file_cache.cpython-36.pyc
3 �Re9 � @ s~ d dl Z d dlZd dlmZ ddlmZ ddlmZ ye W n e k rX e efZY nX dd� ZG dd � d e�Z d d� ZdS )� N)�dedent� )� BaseCache)�CacheControllerc C s� t j}|t jt jB O }tt d�r*|t jO }tt d�r>|t jO }yt j| � W n tt fk rd Y nX t j | ||�}yt j|d�S t j|� � Y nX d S )N� O_NOFOLLOW�O_BINARY�wb) �os�O_WRONLY�O_CREAT�O_EXCL�hasattrr r �remove�IOError�OSError�open�fdopen�close)�filename�fmode�flags�fd� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py�_secure_open_write s r c @ sB e Zd Zddd�Zedd� �Zd d � Zdd� Zd d� Zdd� Z dS )� FileCacheF� � Nc C s� |d k r|d k rt d��yddlm} ddlm} W n$ tk rX td�} t| ��Y nX |rd|}n|d krp|}|| _|| _|| _ || _ || _d S )Nz/Cannot use use_dir_lock and lock_class togetherr )�LockFile)� MkdirLockFilez� NOTE: In order to use the FileCache you must have lockfile installed. You can install it via pip: pip install lockfile )� ValueError�lockfiler �lockfile.mkdirlockfiler �ImportErrorr � directory�forever�filemode�dirmode� lock_class) �selfr$ r% r&