(self, params)
| 202 | raise NotImplementedError('remove_agent') |
| 203 | |
| 204 | def _stop_agent(self, params): |
| 205 | process = subprocess.Popen( |
| 206 | ['service', 'codedeploy-agent', 'stop'], |
| 207 | stdout=subprocess.PIPE, |
| 208 | stderr=subprocess.PIPE, |
| 209 | ) |
| 210 | (output, error) = process.communicate() |
| 211 | if process.returncode != 0 and params.not_found_msg not in error: |
| 212 | raise RuntimeError( |
| 213 | f'Failed to stop the AWS CodeDeploy Agent:\n{error}' |
| 214 | ) |
| 215 | return process |
| 216 | |
| 217 | |
| 218 | class Ubuntu(Linux): |
no test coverage detected