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: //usr/lib/python3.6/site-packages/awscli/customizations/gamelift/__pycache__/getlog.cpython-36.pyc
3

�T_-�@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N)�partial)�urlopen)�BasicCommandc@s4eZdZdZdZdddd�dddd�gZd	d
�ZdS)�GetGameSessionLogCommandzget-game-session-logz2Download a compressed log file for a game session.zgame-session-idTzThe game session ID)�nameZrequiredZ	help_textzsave-asz5The filename to which the file should be saved (.zip)c	Cs�|jjd|j|j|jd�}|j|jd�}|d}t|�}tj	j
d|j�t|jd��,}x$t
t|jd�d�D]}|j
|�qlWWdQRXtj	j
d	|j|jf�d
S)NZgamelift)Zregion_name�endpoint_urlZverify)Z
GameSessionIdZPreSignedUrlz/Downloading log archive for game session %s...
�wbi�z>Successfully downloaded log archive for game session %s to %s
r)Z_sessionZ
create_clientZregionrZ
verify_sslZget_game_session_log_urlZgame_session_idr�sys�stdout�write�openZsave_as�iterr�read)	�self�argsZparsed_globalsZclientZresponseZurl�contents�f�chunk�r�/usr/lib/python3.6/getlog.py�	_run_mains$


z"GetGameSessionLogCommand._run_mainN)�__name__�
__module__�__qualname__�NAMEZDESCRIPTIONZ	ARG_TABLErrrrrrs
r)r
�	functoolsrZ
awscli.compatrZawscli.customizations.commandsrrrrrr�<module>
s