mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes handling of terminal_initial_prompt on dellos6 and dellos9 devices (#45273)
* Fix terminal initial prompt on dellos6 and dellos9 * Fix_pylint
This commit is contained in:
parent
eaf01d321f
commit
06fd9820a3
2 changed files with 10 additions and 0 deletions
|
@ -50,6 +50,12 @@ class TerminalModule(TerminalBase):
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
terminal_initial_prompt = br"\(y/n\)"
|
||||||
|
|
||||||
|
terminal_initial_answer = b"y"
|
||||||
|
|
||||||
|
terminal_inital_prompt_newline = False
|
||||||
|
|
||||||
def on_become(self, passwd=None):
|
def on_become(self, passwd=None):
|
||||||
if self._get_prompt().endswith('#'):
|
if self._get_prompt().endswith('#'):
|
||||||
return
|
return
|
||||||
|
|
|
@ -45,6 +45,10 @@ class TerminalModule(TerminalBase):
|
||||||
re.compile(br"'[^']' +returned error code: ?\d+"),
|
re.compile(br"'[^']' +returned error code: ?\d+"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
terminal_initial_prompt = br"\[y/n\]:"
|
||||||
|
|
||||||
|
terminal_initial_answer = b"y"
|
||||||
|
|
||||||
def on_open_shell(self):
|
def on_open_shell(self):
|
||||||
try:
|
try:
|
||||||
self._exec_cli_command(b'terminal length 0')
|
self._exec_cli_command(b'terminal length 0')
|
||||||
|
|
Loading…
Reference in a new issue