mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fixes prompt doubling issue that impacted missing ios enable password prompts. (#33794)
* Fixes a prompt doubling issue that impacted missing ios enable password prompts. Due to get_prompt sending a '\n' the prompts became doubled and out-of-sync with what was expected. This caused the enable command prompts to be missed. Also added verification that on_become succeeded to reach enable prompt. * Moved prompt doubling comment per shippable
This commit is contained in:
parent
3c0a84349b
commit
d59bba4652
2 changed files with 9 additions and 2 deletions
|
@ -69,7 +69,10 @@ class TerminalBase(with_metaclass(ABCMeta, object)):
|
|||
|
||||
:returns: A byte string of the prompt
|
||||
"""
|
||||
self._exec_cli_command(b'\n')
|
||||
# do not send '\n' here, exec_cli_command sends '\r' already,
|
||||
# doing so causes double prompts.
|
||||
self._exec_cli_command(b'')
|
||||
|
||||
return self._connection._matched_prompt
|
||||
|
||||
def on_open_shell(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue