HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/__pycache__/scalarparse.cpython-38.pyc
U

<�^��@sHdZddlmZddlmZdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)aAChange the scalar response parsing behavior for the AWS CLI.

The underlying library used by botocore has some response parsing
behavior that we'd like to modify in the AWS CLI.  There are two:

    * Parsing binary content.
    * Parsing timestamps (dates)

For the first option we can't print binary content to the terminal,
so this customization leaves the binary content base64 encoded.  If the
user wants the binary content, they can then base64 decode the appropriate
fields as needed.

There's nothing currently done for timestamps, but this will change
in the future.

�)�parse_timestamp)�ProfileNotFoundcCs|�dt�dS)Nzsession-initialized)Zregister_first�add_scalar_parsers)Zevent_handlers�r�C/usr/lib/python3/dist-packages/awscli/customizations/scalarparse.py�register_scalar_parser"s�rcCs|S�Nr)�xrrr�identity'sr
cCst|���Sr)rZ	isoformat)�valuerrr�
iso_format+srcCsp|�d�}z|���dd�}Wntk
r6d}YnX|dkrFt}n|dkrTt}ntd|��|j|d�dS)N�response_parser_factoryZcli_timestamp_formatZnoneZiso8601zLUnknown cli_timestamp_format value: %s, valid values are "none" or "iso8601")�timestamp_parser)�
get_componentZget_scoped_config�getrr
r�
ValueError�set_parser_defaults)�session�factoryZtimestamp_formatrrrr�add_timestamp_parser/s 
�
�rcKs"|�d�}|jtd�t|�dS)Nr
)Zblob_parser)rrr
r)r�kwargsrrrrrLs
rN)
�__doc__Zbotocore.utilsrZbotocore.exceptionsrrr
rrrrrrr�<module>
s