Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working around #11 until the next Netmiko release
Until there will be a more permanent solution in Netmiko, in order to have this driver usable with version 4.x, we need to "help" Netmiko when it fails to detect the prompt. Strictly speaking, as discussed under ktbyers/netmiko#2866 Netmiko works as designed, the ``base_prompt`` attribute is what we'd expect to be, but when OpenGear doesn't set anything on the prompt other than ``$`` or ``#`` depending on the user elevation, then Netmiko fails to properly read (more specifically, won't know when to stop). I also took this chance to change the behaviour in ``open()`` to only invoke ``enable()`` when the user is not root -- this saves one unnecessary operation when we use the root user.
- Loading branch information