returns xml as a display option to junos_command (#21833)

The display option xml as accidentially removed from the display
argument.  This patch adds xml back as an option.

fixes #21823
This commit is contained in:
Peter Sprygada 2017-03-02 16:05:20 -06:00 committed by GitHub
parent 8d76703a9d
commit 7b2c013e5a
4 changed files with 41 additions and 45 deletions

View file

@ -183,7 +183,7 @@ class Connection(_Connection):
cleaned = []
command = obj.get('command') if obj else None
for line in resp.splitlines():
if (command and line.startswith(command.strip())) or self._find_prompt(line):
if (command and line.startswith(command.strip())) or self._matched_prompt.strip() in line:
continue
cleaned.append(line)
return str("\n".join(cleaned)).strip()