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/customizations/codedeploy/__pycache__/ |
Upload File : |
o .&�a� � @ sH d dl Z d dlZd dlZd dlmZmZ d dlmZ G dd� de�ZdS )� N)�validate_instance�validate_region)�BasicCommandc @ s, e Zd ZdZdZdd� Zdd� Zdd� Zd S ) � Uninstall� uninstallzBUninstalls the AWS CodeDeploy Agent from the on-premises instance.c C s� |}| j |_t||� t|� |j�� z | �|� | �|� W d S tyB } zt j �� t j� d�|�� W Y d }~d S d }~ww )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. )�_session�sessionr r �system�validate_administrator�_uninstall_agent�_delete_config_file� Exception�sys�stdout�flush�stderr�write�format)�self�parsed_args�parsed_globals�params�e� r �L/usr/lib/python3/dist-packages/awscli/customizations/codedeploy/uninstall.py� _run_main s ���zUninstall._run_mainc C s( t j�d� |j�|� t j�d� d S )Nz)Uninstalling the AWS CodeDeploy Agent... �DONE )r r r r r )r r r r r r 3 s zUninstall._uninstall_agentc C sd t j�d� z t�|jj� W n ty) } z|jtj kr|�W Y d }~nd }~ww t j�d� d S )Nz3Deleting the on-premises instance configuration... r ) r r r �os�remover �CONFIG_PATH�OSError�errno�ENOENT)r r r r r r r 8 s ���zUninstall._delete_config_fileN)�__name__� __module__�__qualname__�NAME�DESCRIPTIONr r r r r r r r s �r ) r r r! �&awscli.customizations.codedeploy.utilsr r �awscli.customizations.commandsr r r r r r �<module> s