✏️ 编辑:persistor.cpython-39.opt-1.pyc
路径:
/usr/lib/python3.9/site-packages/dnf/__pycache__/persistor.cpython-39.opt-1.pyc
大小:4.14 KB · 修改:2026-05-20 19:48:39 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a �!cV � @ s� d dl mZ d dl mZ d dlmZ d dlZd dlZd dlZd dl Z d dl Z d dlZd dlZe � d�ZG dd� de�ZG dd � d e�ZG d d� de�ZdS )� )�absolute_import)�unicode_literals)�_N�dnfc @ s, e Zd Zdd� Zg fdd�Zedd� �ZdS )�JSONDBc C s0 t j�|�s,tj�t j�|�� | �|g � d S �N)�os�path�isfiler �utilZ ensure_dir�dirname�_write_json_db)�self� json_path� r �1/usr/lib/python3.9/site-packages/dnf/persistor.py�_check_json_db* s zJSONDB._check_json_dbc C s� t |d��}|�� }W d � n1 s(0 Y |dkrXt�td�|� | �||� n>zt�|�}W n. ty� } zt�|� W Y d }~n d }~0 0 |S )N�r� z%s is empty file) �open�read�logger�warningr r �json�loads� ValueError)r r �default�f�content�er r r �_get_json_db0 s & zJSONDB._get_json_dbc C s: t | d��}t�||� W d � n1 s,0 Y d S )N�w)r r �dump)r r r r r r r >