File: //usr/lib/python3.6/site-packages/ipalib/__pycache__/sysrestore.cpython-36.opt-1.pyc
3
�d[e]6 � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl Z e j
r\d dlmZ
nd dlm
Z
d dlmZ d dlmZ e j
r�eZeje�ZejZdZd ZG d
d� d�ZG dd
� d
�ZdS )� )�absolute_importN)�sha256)�ConfigParser)�SafeConfigParser)�tasks)�pathszsysrestore.indexzsysrestore.statec @ s` e Zd ZdZeefdd�Zdd� Zdd� Zdd � Z d
d� Z
dd
d�Zdd� Zdd� Z
dd� ZdS )� FileStorez.Class for handling backup and restore of filesc C s4 || _ tjj| j |�| _tj� | _i | _| j� dS )z�Create a _StoreFiles object, that uses @path as the
base directory.
The file @path/sysrestore.index is used to store information
about the original location of the saved files.
N) �_path�os�path�join�_index�randomZRandom�files�_load)�selfr Z
index_file� r � /usr/lib/python3.6/sysrestore.py�__init__= s
zFileStore.__init__c C sp t jd| j� i | _tdd�}t|_|j| j� x:|j� D ].}|dkr:x |j |�D ]\}}|| j|<