Changed string check to verify that EOS device is not in config mode. (#28332)
Changed string check to verify that EOS device is not in config mode. This was required in order to work with Arista 7500 series modular switches. Resolves #2830
This commit is contained in:
parent
bd56e6c9ce
commit
8e8a7c869a
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ class ActionModule(_ActionModule):
|
|||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
rc, out, err = connection.exec_command('prompt()')
|
||||
while str(out).strip().endswith(')#'):
|
||||
while '(config' in str(out):
|
||||
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
|
||||
connection.exec_command('exit')
|
||||
rc, out, err = connection.exec_command('prompt()')
|
||||
|
|
Loading…
Reference in a new issue