HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/awscli/customizations/__pycache__/scalarparse.cpython-36.opt-1.pyc
3

�T_��@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|jdt�dS)Nzsession-initialized)Zregister_first�add_scalar_parsers)Zevent_handlers�r�!/usr/lib/python3.6/scalarparse.py�register_scalar_parser"srcCs|S)Nr)�xrrr�identity'sr	cCst|�j�S)N)rZ	isoformat)�valuerrr�
iso_format+srcCsp|jd�}y|j�jdd�}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_formatr
rrr�add_timestamp_parser/s


rcKs"|jd�}|jtd�t|�dS)Nr)Zblob_parser)rrr	r)r�kwargsrrrrrLs
rN)
�__doc__Zbotocore.utilsrZbotocore.exceptionsrrr	rrrrrrr�<module>s