https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/awscli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/awscli/__pycache__/utils.cpython-310.pyc
o

2&�aV$�@sddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
dd�Zdd�Zd(d
d�Z
dd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zejdd��Zdd�Zdd�ZGdd�de�Zd d!�ZGd"d#�d#e�ZGd$d%�d%e�ZGd&d'�d'e�ZdS))�N)�six��get_binary_stdout)�get_popen_kwargs_for_pager_cmdcsZt�fdd�dD��s��d�St�fdd�dD��s)ttjt���dd��d	St��S)
Nc3��|]}|�vVqdS�N���.0�char��valuer�./usr/lib/python3/dist-packages/awscli/utils.py�	<genexpr>��z"split_on_commas.<locals>.<genexpr>)�"�\�'�]�[�,c3rrrr	rrrrr)rrrrr��
escapecharr)�any�split�list�csv�readerr�StringIO�_split_with_quotesrrrr�split_on_commass

r c	Cs<zttjt�|�dd��d}Wntjytd|��wt|�}g}|D]t}t|�}|�	d�}|dkrs|�	d�dkrs|dusH|�	|�|krsd|vrO|}nt
|||d�}t||dd��}|d|d	�d
�|�}|�
|�q'|dur}|�
|�q'|�|�dkr�|�
|�|d��q't
|||||�}|�
|�q'|S)NrrrzBad csv value: %sz=[r�����r�)rrrrr�Error�
ValueError�iter�_find_quote_char_in_part�find�
_eat_itemsr�join�append�count�replace)	r
�parts�
iter_parts�	new_parts�part�
quote_char�
list_start�	new_chunk�
list_itemsrrrr's8 �


rr$cCsd|}|�|d�g}	zt�|�}Wntyt|��w|�|�|d��|�|�r,nq
d�|�S)z�
    Eat items from an iterator, optionally replacing characters with
    a blank and stopping when the end_char has been reached.
    r$Tr)r.r�advance_iterator�
StopIterationr&r,�endswithr+)r
r0r2�end_char�replace_char�current�chunksrrrr*Rs�
�
r*cCs|d|vr
d|vr
dSd}|�d�}|�d�}|dkr"|dkr"d}|S|dkr.|dkr.d}|S||kr6d}|S||kr<d}|S)Nrrrr!)r))r2r3�double_quote�single_quoterrrr(ds"

���r(cCsJ|�d�dd�}d}t|�dkr|d}d}t|�dkr!|d}||fS)z�
    Grabs the service id and the operation name from an event name.
    This is making the assumption that the event name is in the form
    event.service.operation.
    �.r#Nr)r�len)�
event_name�split_event�service_name�operation_namerrr�%find_service_and_method_in_event_nameusrFcCst|dd�S)z!Check if shape is a document type�is_document_typeF)�getattr)�shaperrrrG�srGcCsR|sdSt�}t��||�|j��}t|�sdS|jD]
}|jdvr&dSqdS)z�Check if the shape is a document type or wraps document types

    This is helpful to determine if a shape purely deals with document types
    whether the shape is a document type or it is lists or maps whose base
    values are document types.
    F)r�mapT)�ShapeRecordingVisitor�ShapeWalker�walk�visited�poprG�	type_name)rI�recording_visitor�	end_shaperrr�is_document_type_container�s


�rScCsFt�}t�}|�|j|�|�|j|�|jD]	}t|�r dSqdS)z6Check if document types are ever used in the operationTF)rKrLrM�input_shape�output_shaperNrG)�operation_modelrQ�walker�
visited_shaperrr�operation_uses_document_types�s
�rYcCst|tj�r
|��S|S)z6JSON encoder that formats datetimes as ISO8601 format.)�
isinstance�datetime�	isoformat)�objrrr�json_encoder�sr^c
cs>�t�tjtj�}z
dVWt�tj|�dSt�tj|�wr)�signal�SIGINT�SIG_IGN)�originalrrr�
ignore_ctrl_c�s
�"rccCs|jd||d�dS)Nztop-level-args-parsed)�parsed_args�session)�emit)re�argsrrr� emit_top_level_args_parsed_event�s
�rhc
Cs:z	t�tj���WSty}zWYd}~dSd}~ww)NF)�os�isatty�sys�stdout�fileno�	Exception)�errr�is_a_tty�s��rpc@s<eZdZd
dd�Zejd
dd��Zejdd��Zdd	�ZdS)�OutputStreamFactoryNcCs||_|dur
tj|_dSdSr)�_popen�
subprocess�Popen)�self�popenrrr�__init__�s�zOutputStreamFactory.__init__ccsd�|�|�}z&z|jdi|��}|jVWn	tyYnwW|��dSW|��dS|��w)Nr)�_get_process_pager_kwargsrr�stdin�IOError�communicate)ru�preferred_pager�popen_kwargs�processrrr�get_pager_stream�s�
���z$OutputStreamFactory.get_pager_streamccs�t�VdSrr�rurrr�get_stdout_stream�s�z%OutputStreamFactory.get_stdout_streamcCst|�}tj|d<|S)Nry)rrs�PIPE)ru�	pager_cmd�kwargsrrrrx�s
z-OutputStreamFactory._get_process_pager_kwargsr)	�__name__�
__module__�__qualname__rw�
contextlib�contextmanagerrr�rxrrrrrq�s

rqcCs(|�d�|�t�|��|�d�dS)N�
)�writer�	text_type)�ex�outfilerrr�write_exception�s
r�c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)rLcCs|durdSg}|�|||�S)z�Walk through and visit shapes for introspection

        :type shape: botocore.model.Shape
        :param shape: Shape to walk

        :type visitor: BaseShapeVisitor
        :param visitor: The visitor to call when walking a shape
        N)�_walk�rurI�visitor�stackrrrrM�s
zShapeWalker.walkcCsB|j|vrdS|�|j�t|d|j|j�|||�|��dS)Nz_walk_%s)�namer,rHrP�_default_scalar_walkrOr�rrrr��s
�zShapeWalker._walkcCs2|�||�|j��D]\}}|�|||�qdSr)�_do_shape_visit�members�itemsr�)rurIr�r��_�member_shaperrr�_walk_structures�zShapeWalker._walk_structurecC� |�||�|�|j||�dSr)r�r��memberr�rrr�
_walk_list	�zShapeWalker._walk_listcCr�r)r�r�r
r�rrr�	_walk_map
r�zShapeWalker._walk_mapcCs|�||�dSr)r�r�rrrr��z ShapeWalker._default_scalar_walkcCs|�|�dSr)�visit_shape)rurIr�rrrr�szShapeWalker._do_shape_visitN)
r�r�r�rMr�r�r�r�r�r�rrrrrL�s	rLc@seZdZdZdd�ZdS)�BaseShapeVisitorz&Visit shape encountered by ShapeWalkercCsdSrr�rurIrrrr�szBaseShapeVisitor.visit_shapeN)r�r�r��__doc__r�rrrrr�sr�c@s eZdZdZdd�Zdd�ZdS)rKz$Record shapes visited by ShapeWalkercCs
g|_dSr)rNr�rrrrw s
zShapeRecordingVisitor.__init__cCs|j�|�dSr)rNr,r�rrrr�#r�z!ShapeRecordingVisitor.visit_shapeN)r�r�r�r�rwr�rrrrrKsrK)r$)rr_r[r�rirkrs�
awscli.compatrrrr rr*r(rFrGrSrYr^r�rcrhrp�objectrqr�rLr�rKrrrr�<module>s8
+
-

https://t.me/RX1948 - 2025