fix regex in plugins/terminal/iosxr.py (#54817)

Fixes situations where iosxr terminals that do not contain new line "/r/n" at the beginning of CLI timeouts due to regex error. Just make "/r/n" optional including "*" character in the regex
This commit is contained in:
liviozanol 2019-09-11 06:05:15 -03:00 committed by Ganesh Nalawade
parent aaa6d2ecb0
commit 3a05955ec8

View file

@ -29,7 +29,7 @@ from ansible.errors import AnsibleConnectionFailure
class TerminalModule(TerminalBase): class TerminalModule(TerminalBase):
terminal_stdout_re = [ terminal_stdout_re = [
re.compile(br"[\r\n][\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), re.compile(br"[\r\n]*[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
re.compile(br']]>]]>[\r\n]?') re.compile(br']]>]]>[\r\n]?')
] ]