Back to 'prompt' for authorize prompt (#32932)

This commit is contained in:
Nathaniel Case
2017-11-15 12:22:14 -05:00
committed by GitHub
parent c56dcb7afa
commit 7414405063
2 changed files with 2 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ class TerminalModule(TerminalBase):
cmd = {u'command': u'enable'}
if passwd:
cmd[u'prompts'] = 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
try:

View File

@@ -60,7 +60,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'prompts'] = 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
try: