�
�WcJ- � � � d dl Zd dlZd dlZd dlZddgZdZ e
Z G d� dej j � Zd
d �ZdS )� N�error�openi c � � e Zd ZeZeZdd�Zd� Zd� Zd� ZeZ d� Z
d� Zd� Zd � Z
d
� Zd� Zd� Zd
� Zd� Zd� Zd� ZeZd� Zd� ZeZd� Zd� Zd� ZdS )� _Database�cc �� � | j j |� }|| _ |dk | _ |dz | _ |dz | _ |dz | _ d | _ | j |� | j |� d S )N�rs .dirs .dats .bak)
�_os�fsencode�_mode� _readonly�_dirfile�_datfile�_bakfile�_index�_create�_update)�self�filebasename�mode�flags �!/usr/lib64/python3.12/dbm/dumb.py�__init__z_Database.__init__0 s � ��x�x�(�(��6����
��#�+��� %�w�.��
� %�w�.��
�$�w�.��
� ���
���T������T����� c �� � |dk r?| j | j | j fD ] } t j |� � t
j | j dd�� }|j � d S # t
$ r Y �`w xY w# t
$ ra |dvr� t
j | j dd�� 5 }| j | j � d d d � Y d S # 1 sw Y Y d S xY ww xY w)N�nr �Latin-1��encoding�r r �w)
r r r r
�remove�OSError�_ior �close�_chmod)r r �filename�fs r r z_Database._createJ sS � ��3�;�;�!�]�]�D�M�M�4�=�=�I�
�
����J�J�x�(�(�(� ��������i�@�@�A�
�G�G�I�I�I�I�� � � � ��D������
� +� +� +��:�%�%�����$�-�-��y�A�A�
+�Q����D�M�M�*�*�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+�
+���� +���s; �A>�$B �>
B�
B�3C9�C*� C9�*C5 �/C9�5C9c �~ � d| _ i | _ t j | j dd�� }|5 |D ]N }|j � }t
j |� \ }}|j d� }|| j |<