Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
awscli
/
customizations
/
s3
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: s3handler.cpython-310.pyc
o .&�a[ � @ s: d dl Z d dlZd dlmZ d dlmZmZmZmZm Z m Z d dlmZ d dl mZ d dl mZ d dl mZ d dl mZ d d l mZ d d l mZ d dl mZ d dl mZ d d l mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ d dlmZ d dlm Z d dlm!Z! d dlm"Z" d dlm#Z# d dlm$Z$ d dlm%Z% d dlm&Z& d dlm'Z' d dl(m)Z) e �*e+�Z,G d d!� d!e-�Z.G d"d#� d#e-�Z/G d$d%� d%e-�Z0G d&d'� d'e0�Z1G d(d)� d)e0�Z2G d*d+� d+e0�Z3G d,d-� d-e1�Z4G d.d/� d/e2�Z5G d0d1� d1e0�Z6G d2d3� d3e0�Z7dS )4� N)�TransferManager)�human_readable_size�MAX_UPLOAD_SIZE�find_bucket_key� relative_path�create_warning�NonSeekableStream)�*create_transfer_config_from_runtime_config)�UploadResultSubscriber)�DownloadResultSubscriber)�CopyResultSubscriber)�UploadStreamResultSubscriber)�DownloadStreamResultSubscriber)�DeleteResultSubscriber)�QueuedResult)� SuccessResult)� FailureResult)�DryRunResult)�ResultRecorder)� ResultPrinter)�OnlyShowErrorsResultPrinter)�NoProgressResultPrinter)�ResultProcessor)�CommandResultRecorder)�RequestParamsMapper��StdoutBytesWriter)�ProvideSizeSubscriber)�"ProvideUploadContentTypeSubscriber)� ProvideCopyContentTypeSubscriber)�!ProvideLastModifiedTimeSubscriber)�DirectoryCreatorSubscriber)�DeleteSourceFileSubscriber)�DeleteSourceObjectSubscriber)� DeleteCopySourceObjectSubscriber)�get_binary_stdinc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �S3TransferHandlerFactory� c C s || _ || _dS )a Factory for S3TransferHandlers :type cli_params: dict :param cli_params: The parameters provide to the CLI command :type runtime_config: RuntimeConfig :param runtime_config: The runtime config for the CLI command being run N)�_cli_params�_runtime_config)�self� cli_params�runtime_config� r- �D/usr/lib/python3/dist-packages/awscli/customizations/s3/s3handler.py�__init__: s z!S3TransferHandlerFactory.__init__c C sr t | j�}| j|_| j|_t||�}t�d|j|j � t � }|g}| �||� t||�}t |||�}t|| j|�S )ag Creates a S3TransferHandler instance :type client: botocore.client.Client :param client: The client to power the S3TransferHandler :type result_queue: queue.Queue :param result_queue: The result queue to be used to process results for the S3TransferHandler :returns: A S3TransferHandler instance z7Using a multipart threshold of %s and a part size of %s)r r) �MAX_IN_MEMORY_CHUNKS�max_in_memory_upload_chunks�max_in_memory_download_chunksr �LOGGER�debug�multipart_threshold�multipart_chunksizer �_add_result_printerr r �S3TransferHandlerr( ) r* �client�result_queue�transfer_config�transfer_manager�result_recorder�result_processor_handlers�result_processor�command_result_recorderr- r- r. �__call__G s0 �� ����z!S3TransferHandlerFactory.__call__c C sh | j �d�rd S | j �d�rt|�}n| j �d�rt|�}n| j �d�s)t|�}nt|�}|�|� d S )N�quiet�only_show_errors� is_stream�progress)r( �getr r r �append)r* r= r>