관리-도구
편집 파일: dumb.cpython-39.opt-2.pyc
a R�f- � @ sR d dl Zd dlZd dlZd dlZddgZdZ e ZG dd� dejj �Zd d d�ZdS )� N�error�openi c @ s� e Zd ZeZeZd+dd�Zdd� Zdd� Zdd � ZeZ d d� Z dd � Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZeZd d!� Zd"d#� ZeZd$d%� Zd&d'� Zd(d)� Zd*S ),� _Database�cc C sL || _ |dk| _|d | _|d | _|d | _d | _| �|� | �|� d S )N�rz.dirz.datz.bak)�_mode� _readonly�_dirfile�_datfile�_bakfile�_index�_create�_update)�selfZfilebasename�mode�flag� r �-/opt/alt/python39/lib64/python3.9/dbm/dumb.py�__init__0 s z_Database.__init__c C s� |dkr@| j | j| jfD ]&}zt�|� W q ty< Y q0 qztj| j ddd�}W nZ ty� |dvrn� tj| j ddd��}| �| j � W d � n1 s�0 Y Y n 0 |� � d S )N�nr �Latin-1��encoding�r r �w) r r r �_os�remove�OSError�_ior �_chmod�close)r r �filename�fr r r r I s 0z_Database._createc C s� d| _ i | _ztj| jddd�}W n" tyD |dvr:� d| _ Y nZ0 |�D |D ].}|�� }t�|�\}}|� d�}|| j|<