mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Fix for whitespace padding on JSON responses
Fixes #17825, closes #17829
This commit is contained in:
parent
25aa757e80
commit
3f4ac0b9f7
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ class Shell(object):
|
||||||
def sanitize(self, cmd, resp):
|
def sanitize(self, cmd, resp):
|
||||||
cleaned = []
|
cleaned = []
|
||||||
for line in resp.splitlines():
|
for line in resp.splitlines():
|
||||||
if line.startswith(str(cmd)) or self.find_prompt(line):
|
if line.lstrip().startswith(str(cmd)) or self.find_prompt(line):
|
||||||
continue
|
continue
|
||||||
cleaned.append(line)
|
cleaned.append(line)
|
||||||
return "\n".join(cleaned)
|
return "\n".join(cleaned)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue