mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Python3 fixes and porting (#17271)
* Fix to_native call in selinux_context and selinux_default_context to use the error handler correctly. * Port set_mode_if_different to work on python3 * Port atomic_move to work on python3 * Fix check_password_prompt variable which wasn't renamed properly
This commit is contained in:
@@ -254,7 +254,7 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
||||
b_prompt = to_bytes(self._play_context.prompt)
|
||||
return b_output.startswith(b_prompt)
|
||||
else:
|
||||
return self._play_context.prompt(output)
|
||||
return self._play_context.prompt(b_output)
|
||||
|
||||
def check_incorrect_password(self, b_output):
|
||||
b_incorrect_password = to_bytes(gettext.dgettext(self._play_context.become_method, C.BECOME_ERROR_STRINGS[self._play_context.become_method]))
|
||||
|
||||
Reference in New Issue
Block a user