Skip to content

Commit

Permalink
fix Python 2.6 regex bug terminal plugin nxos, iosxr (ansible#45135)
Browse files Browse the repository at this point in the history
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ab3cd10)
  • Loading branch information
trishnaguha committed Sep 4, 2018
1 parent 55873af commit 5c15a0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/terminal/iosxr.py
Expand Up @@ -29,7 +29,7 @@
class TerminalModule(TerminalBase):

terminal_stdout_re = [
re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
re.compile(br"[\r\n][\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
re.compile(br']]>]]>[\r\n]?')
]

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/terminal/nxos.py
Expand Up @@ -30,7 +30,7 @@
class TerminalModule(TerminalBase):

terminal_stdout_re = [
re.compile(br'[\r\n]?(?!\s*<)?(\x1b\S+)*[a-zA-Z_0-9]{1}[a-zA-Z0-9-_.]*[>|#](?:\s*)*(\x1b\S+)*$'),
re.compile(br'[\r\n](?!\s*<)?(\x1b\S+)*[a-zA-Z_0-9]{1}[a-zA-Z0-9-_.]*[>|#](?:\s*)*(\x1b\S+)*$'),
re.compile(br'[\r\n]?[a-zA-Z0-9]{1}[a-zA-Z0-9-_.]*\(.+\)#(?:\s*)$')
]

Expand Down

0 comments on commit 5c15a0a

Please sign in to comment.