Skip to content

Commit

Permalink
terminal regex udpate to match the terminal prompt in safe mode (ansi…
Browse files Browse the repository at this point in the history
…ble-collections#134)

* terminal regex udpate to match the terminal prompt in safe mode

Signed-off-by: Tomas Herfert <herfik>

* changelog

Signed-off-by: Tomas Herfert <herfik>

* yamllint fix

Signed-off-by: Tomas Herfert <herfik>

* Update changelogs/fragments/134-command-safemode.yml

Co-authored-by: Felix Fontein <[email protected]>

Signed-off-by: Tomas Herfert <herfik>
Co-authored-by: Tomas Herfert <herfik>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
therfert and felixfontein authored Nov 17, 2022
1 parent 5af14a8 commit 309e2b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/134-command-safemode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- "command, facts - commands do not timeout in safe mode anymore
(https://github.com/ansible-collections/community.routeros/pull/134)."
2 changes: 1 addition & 1 deletion plugins/terminal/routeros.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TerminalModule(TerminalBase):

terminal_stdout_re = [
re.compile(br"\x1b<"),
re.compile(br"\[[\w\-\.]+\@[\w\s\-\.\/]+\] ?> ?$"),
re.compile(br"\[[\w\-\.]+\@[\w\s\-\.\/]+\] ?(<SAFE)?> ?$"),
re.compile(br"Please press \"Enter\" to continue!"),
re.compile(br"Do you want to see the software license\? \[Y\/n\]: ?"),
]
Expand Down

0 comments on commit 309e2b1

Please sign in to comment.