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:
abirami-n 2018-09-12 19:28:32 +05:30 committed by Deepak Agrawal
parent eaf01d321f
commit 06fd9820a3
2 changed files with 10 additions and 0 deletions

View file

@ -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):
if self._get_prompt().endswith('#'):
return

View file

@ -45,6 +45,10 @@ class TerminalModule(TerminalBase):
re.compile(br"'[^']' +returned error code: ?\d+"),
]
terminal_initial_prompt = br"\[y/n\]:"
terminal_initial_answer = b"y"
def on_open_shell(self):
try:
self._exec_cli_command(b'terminal length 0')