Fix vyos cli prompt issues (#55589)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
Nilashish Chakraborty 2019-05-07 20:51:35 +05:30 committed by GitHub
parent 86e98c5213
commit 7608bc821e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,9 +81,9 @@ class ActionModule(ActionNetworkModule):
conn = Connection(socket_path)
out = conn.get_prompt()
while to_text(out, errors='surrogate_then_replace').strip().endswith(')#'):
while to_text(out, errors='surrogate_then_replace').strip().endswith('#'):
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
conn.send_command('abort')
conn.send_command('exit discard')
out = conn.get_prompt()
result = super(ActionModule, self).run(task_vars=task_vars)