o .&ßašã@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.c Cs†|}|j|_t||ƒt|ƒ|j ¡z | |¡| |¡WdStyB}zt j   ¡t j   d |¡¡WYd}~dSd}~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ÚsessionrrÚ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_mains     ú€þzUninstall._run_maincCs(tj d¡|j |¡tj d¡dS)Nz)Uninstalling the AWS CodeDeploy Agent... úDONE )rrrr r)rrrrrr 3s  zUninstall._uninstall_agentc Csdtj d¡z t |jj¡Wnty)}z|jtj kr|‚WYd}~nd}~wwtj d¡dS)Nz3Deleting the on-premises instance configuration... r) rrrÚosÚremover Ú CONFIG_PATHÚOSErrorÚerrnoÚENOENT)rrrrrrr 8s   ÿ€ÿzUninstall._delete_config_fileN)Ú__name__Ú __module__Ú __qualname__ÚNAMEÚ DESCRIPTIONrr r rrrrrsÿ r) rrr!Ú&awscli.customizations.codedeploy.utilsrrÚawscli.customizations.commandsrrrrrrÚs