fix Python 2.6 regex bug terminal plugin nxos, iosxr (#45135)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ab3cd10dfe
)
This commit is contained in:
parent
2a8ffbc0ed
commit
c1c9d88ebc
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ from ansible.errors import AnsibleConnectionFailure
|
|||
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]?')
|
||||
]
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ from ansible.module_utils._text import to_bytes, to_text
|
|||
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*)$')
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue