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/codedeploy/__pycache__/uninstall.cpython-36.pyc
3

�T_��@sHddlZddlZddlZddlmZmZddlmZGdd�de�ZdS)�N)�validate_instance�validate_region)�BasicCommandc@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�	Uninstall�	uninstallzBUninstalls the AWS CodeDeploy Agent from the on-premises instance.cCs�|}|j|_t||�t|�|jj�y|j|�|j|�Wn>tk
r~}z"t	j
j�t	jj
dj|��WYdd}~XnXdS)Nz�ERROR
{0}
Uninstall the AWS CodeDeploy Agent on the on-premises instance by following the instructions in "Configure Existing On-Premises Instances by Using AWS CodeDeploy" in the AWS CodeDeploy User Guide.
)Z_sessionZsessionrr�systemZvalidate_administrator�_uninstall_agent�_delete_config_file�	Exception�sys�stdout�flush�stderr�write�format)�selfZparsed_argsZparsed_globals�params�e�r�/usr/lib/python3.6/uninstall.py�	_run_mains



zUninstall._run_maincCs(tjjd�|jj|�tjjd�dS)Nz)Uninstalling the AWS CodeDeploy Agent... zDONE
)rrrrr)rrrrrr3szUninstall._uninstall_agentcCsbtjjd�ytj|jj�Wn2tk
rP}z|jtj	kr@|�WYdd}~XnXtjjd�dS)Nz3Deleting the on-premises instance configuration... zDONE
)
rrr�os�removerZCONFIG_PATH�OSError�errno�ENOENT)rrrrrrr	8szUninstall._delete_config_fileN)�__name__�
__module__�__qualname__�NAMEZDESCRIPTIONrrr	rrrrrs
r)	rrrZ&awscli.customizations.codedeploy.utilsrrZawscli.customizations.commandsrrrrrr�<module>s