File: //lib/python3.12/site-packages/dnf/__pycache__/persistor.cpython-312.pyc
�
�(fV � �� � d dl mZ d dl mZ d dlmZ d dlZd dlZd dlZd dl Z d dl
Z
d dlZd dlZ e
j d� Z G d� de� Z G d� d e� Z G d
� de� Zy)� )�absolute_import)�unicode_literals)�_N�dnfc �, � e Zd Zd� Zg fd�Zed� � Zy)�JSONDBc �� � t j j |� sOt j j t j j
|� � | j |g � y y �N)�os�path�isfiler �util�
ensure_dir�dirname�_write_json_db)�self� json_paths �2/usr/lib/python3.12/site-packages/dnf/persistor.py�_check_json_dbzJSONDB._check_json_db* sF � ��w�w�~�~�i�(��H�H�������� � :�;���� �2�.� )� c �\ � t |d� 5 }|j � }d d d � dk( r3t j t d� |� | j ||� |S t
j |� }|S # 1 sw Y �YxY w# t $ r }t j |� Y d }~|S d }~ww xY w)N�r� z%s is empty file) �open�read�logger�warningr r �json�loads�
ValueError)r r �default�f�content�es r �_get_json_dbzJSONDB._get_json_db0 s� � �
�)�S�
!�Q��f�f�h�G� "��b�=��N�N�1�/�0�)�<���� �7�3� ��
"��*�*�W�-�� �� "�
!�� �
"����q�!�!����
"�s# �A6�B �6A?� B+�B&�&B+c �r � t | d� 5 }t j ||� d d d � y # 1 sw Y y xY w)N�w)r r �dump)r r# r"