now detects incorrect password with sudo and su (at least in english)

This commit is contained in:
Brian Coca 2015-06-15 01:30:03 -04:00
commit b89071e485
2 changed files with 2 additions and 1 deletions

View file

@ -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)