mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Network load_config: Capture configuration output and display as warnings (#27851)
* Capture configuration output and display as warnings * Don't break on nxapi nxapi errors very loudly instead, so no need to muck about with warnings
This commit is contained in:
@@ -204,7 +204,7 @@ class Connection(Rpc, _Connection):
|
||||
"""Removes elements from the response before returning to the caller"""
|
||||
cleaned = []
|
||||
for line in resp.splitlines():
|
||||
if (command and line.startswith(command.strip())) or self._matched_prompt.strip() in line:
|
||||
if (command and line.strip() == command.strip()) or self._matched_prompt.strip() in line:
|
||||
continue
|
||||
cleaned.append(line)
|
||||
return b'\n'.join(cleaned).strip()
|
||||
|
||||
Reference in New Issue
Block a user