mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
now detects incorrect password with sudo and su (at least in english)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user