mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
Update connection plugins to use correct, non-deprecated, methods (#52038)
* Update connection plugins to use correct, non-deprecated, methods * Update tests to reflect calling become plugins
This commit is contained in:
parent
d033884465
commit
c55317a2bd
4 changed files with 12 additions and 12 deletions
|
@ -92,7 +92,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
become_output = b''
|
||||
try:
|
||||
while not self.check_become_success(become_output) and not self.check_password_prompt(become_output):
|
||||
while not self.become.check_success(become_output) and not self.become.check_password_prompt(become_output):
|
||||
events = selector.select(self._play_context.timeout)
|
||||
if not events:
|
||||
stdout, stderr = p.communicate()
|
||||
|
@ -111,7 +111,7 @@ class Connection(ConnectionBase):
|
|||
finally:
|
||||
selector.close()
|
||||
|
||||
if not self.check_become_success(become_output):
|
||||
if not self.become.check_success(become_output):
|
||||
p.stdin.write(to_bytes(self._play_context.become_pass, errors='surrogate_or_strict') + b'\n')
|
||||
fcntl.fcntl(p.stdout, fcntl.F_SETFL, fcntl.fcntl(p.stdout, fcntl.F_GETFL) & ~os.O_NONBLOCK)
|
||||
fcntl.fcntl(p.stderr, fcntl.F_SETFL, fcntl.fcntl(p.stderr, fcntl.F_GETFL) & ~os.O_NONBLOCK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue