Edit File: r1soft.cpython-311.opt-1.pyc
� ޡ�en- � �d � d dl Z d dlZd dlZd dlZd dlZd dlZd dl mZ d dlZd dlm Z m Z mZ d dlm Z mZ dZ e ed� � Zd� Z G d� d � � Z G d � de � � Z G d� d � � Z edddd�� � d� � � Zedd�� � Zed� � � Zeed� � � � � ZdS )� N)�JSONDecodeError)� BackupBase�backend_auth_required�extra)�DateTime�from_envz+/var/restore_infected/r1soft_api_token.jsonzInitialize R1Soft first!c � � dS )NT� r � �\/opt/imunify360/venv/lib/python3.11/site-packages/restore_infected/backup_backends/r1soft.py�is_suitabler s � ��4r c �R � e Zd ZdZdZdZdZdZ G d� de� � Z G d� de� � Z d � Zd � Zd� Z ed� � � Zed � � � Zd� Zed� � � Zed� � � Zed� � � Zd� Zed� � � Zd"d�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d� Z"d� Z#d � Z$d!� Z%dS )#�R1SoftConnectorix# zhttp://{}:{}/restzuser/authenticateNc � � � e Zd Z� fd�Z� xZS )�#R1SoftConnector.InternalServerErrorc �t �� d� |� � }t � � � |� � d S )NzInternal server error. {}��format�super�__init__)�self�url�message� __class__s �r r z,R1SoftConnector.InternalServerError.__init__$ s4 �� �1�8�8��=�=�G��G�G���W�%�%�%�%�%r ��__name__� __module__�__qualname__r � __classcell__�r s @r �InternalServerErrorr # s8 �� � � � � � &� &� &� &� &� &� &� &� &r r! c � � � e Zd Z� fd�Z� xZS )�R1SoftConnector.ConnectionErrorc �x �� d� |||� � }t � � � |� � d S )NzRequest to {} failed ({}): {}r )r r �status_code�contentr r s �r r z(R1SoftConnector.ConnectionError.__init__) s: �� �5����[�'�2�2� ��G�G���W�%�%�%�%�%r r r s @r �ConnectionErrorr# ( s8 �� � � � � � &� &� &� &� &� &� &� &� &r r'