File: //usr/lib/python3/dist-packages/duplicity/backends/__pycache__/ssh_pexpect_backend.cpython-310.pyc
o
zVa�3 � @ s� d dl mZ d dlmZ e�� d dlmZ d dlZd dlZd dl m
Z
d dl mZ d dl mZ d dl
mZ d dlZ G d d
� d
e jj�Ze j�de� e j�de� e jj�ddg� dS )
� )�division)�standard_library)�mapN)�config)�log)�util)�BackendExceptionc @ sp e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� ZdS )�SSHPExpectBackendz{This backend copies files using scp. List not supported. Filenames
should not need any quoting or this will break.c C s6 t jj�| |� zddlaW n ty � w d| _d| _tjr$tj| _d| _ tj r.tj | _ t j�
|jd�| _| jdk| _|j
rJ|j
d |j | _n|j| _|jr\t�dd |jd
�| _nd| _| jd | _|jrqtjd
|j t_dtjvr�t jdttjd � 7 _dtjvr�t jd7 _tj| _| �� | _dS )zscpBackend initializerr N�
�scp�sftp�pexpect�@z^/� � �.�/z
-oPort=%s�ServerAliveIntervalz -oServerAliveInterval=%d� �ServerAliveCountMaxz -oServerAliveCountMax=2)� duplicity�backend�Backend�__init__r
�ImportError�retry_delay�scp_commandr �sftp_command�strip_prefix�scheme�use_scp�username�hostname�host_string�path�re�sub�
remote_dir�
remote_prefix�port�ssh_options�int�timeout�ssh_askpass�use_getpass�get_password�password)�self�
parsed_url� r3 �H/usr/lib/python3/dist-packages/duplicity/backends/ssh_pexpect_backend.pyr - s<