mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
now detects incorrect password with sudo and su (at least in english)
This commit is contained in:
parent
5bac17de51
commit
b89071e485
2 changed files with 2 additions and 1 deletions
|
@ -129,6 +129,6 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
|||
return prompt(output)
|
||||
|
||||
def check_incorrect_password(self, output, prompt):
|
||||
incorrect_password = gettext.dgettext(self._connection_info.become_method, "Sorry, try again.")
|
||||
incorrect_password = gettext.dgettext(self._connection_info.become_method, C.BECOME_ERROR_STRINGS[self._connection_info.become_method])
|
||||
return output.endswith(incorrect_password)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue