mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-29 20:39:09 -07:00
Fix ios enable password regex in terminal plugin (#35741)
Fixes #33993 On some ios devices the enable password prompt does not end with a space, add a fix to handle this scenario.
This commit is contained in:
parent
575e9e9294
commit
df5fc7af67
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ class TerminalModule(TerminalBase):
|
|||
if passwd:
|
||||
# Note: python-3.5 cannot combine u"" and r"" together. Thus make
|
||||
# an r string and use to_text to ensure it's text on both py2 and py3.
|
||||
cmd[u'prompt'] = to_text(r"[\r\n]password: $", errors='surrogate_or_strict')
|
||||
cmd[u'prompt'] = to_text(r"[\r\n]password: ?$", errors='surrogate_or_strict')
|
||||
cmd[u'answer'] = passwd
|
||||
cmd[u'prompt_retry_check'] = True
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue