(self, parsed_args, parsed_globals)
| 30 | ) |
| 31 | |
| 32 | def _run_main(self, parsed_args, parsed_globals): |
| 33 | params = parsed_args |
| 34 | params.session = self._session |
| 35 | validate_region(params, parsed_globals) |
| 36 | validate_instance(params) |
| 37 | params.system.validate_administrator() |
| 38 | |
| 39 | try: |
| 40 | self._uninstall_agent(params) |
| 41 | self._delete_config_file(params) |
| 42 | except Exception as e: |
| 43 | sys.stdout.flush() |
| 44 | sys.stderr.write( |
| 45 | 'ERROR\n' |
| 46 | f'{e}\n' |
| 47 | 'Uninstall the AWS CodeDeploy Agent on the on-premises ' |
| 48 | 'instance by following the instructions in "Configure ' |
| 49 | 'Existing On-Premises Instances by Using AWS CodeDeploy" in ' |
| 50 | 'the AWS CodeDeploy User Guide.\n' |
| 51 | ) |
| 52 | return 255 |
| 53 | return 0 |
| 54 | |
| 55 | def _uninstall_agent(self, params): |
| 56 | sys.stdout.write('Uninstalling the AWS CodeDeploy Agent... ') |
nothing calls this directly
no test coverage detected