diff --git a/plugins/connection/aws_ssm.py b/plugins/connection/aws_ssm.py index 46d46c03786..1a20dc8db68 100644 --- a/plugins/connection/aws_ssm.py +++ b/plugins/connection/aws_ssm.py @@ -740,11 +740,10 @@ def _filter_ansi(self, line): line = line.replace('\r\r\n', '\n') if len(line) == 201: line = line[:-1] - + # Remove ansi escape sequences: ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') line = ansi_escape.sub('', line) - return line def _flush_stderr(self, session_process):