Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/netmiko/__pycache__/scp_functions.cpython-39.pyc
Ðазад
a v�h= � @ s4 d Z ddlmZmZ d dd�Zdd� Zddd�ZdS )z� Netmiko SCP operations. Supports file get and file put operations. SCP requires a separate SSH connection for a control channel. � )�FileTransfer�InLineTransferNc C s� d}t | t�r| �� } td�d }d}|| }|d d�d�}t|| �} | d } |d u rhd | � d �}nd|� d| � d �}| d �|d�d|� d�}t|� t|� t|� d S )N�2 � z[2J�|�d z.2f�%�>zTransferring file: � zTransferring file to z: z<50�1z (�))� isinstance�bytes�decode�chr�int�print) �filename�size�sentZpeername� max_widthZclear_screenZterminating_charZpercent_completeZpercent_strZ hash_count�progressZ header_msg�msg� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/netmiko/scp_functions.py�progress_bar s r c C s | � � std��| �� dS )zVerify space and transfer file.z-Insufficient space available on remote deviceN)Zverify_space_available� ValueErrorZ transfer_file)�scp_transferr r r �verifyspace_and_transferfile# s r �putF� $@c C s� dddd�}dddd�} dddd�}d| j v s8d| j v r>d}nd}|sR|rRtd��|du r`| }| ||||| | d�}|dur�||d <