mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-30 04:00:21 -07:00
simplify become testing and handling, we had drifted and were doulbe checking prompt, become and become_pass
fixed tests to conform to new signature and now tests both with and w/o password now we are more explicit about self.prompt
This commit is contained in:
parent
eb0e7e198b
commit
c17fbf2f12
5 changed files with 77 additions and 71 deletions
|
@ -70,7 +70,7 @@ class Connection(ConnectionBase):
|
|||
)
|
||||
self._display.debug("done running command with Popen()")
|
||||
|
||||
if self._play_context.prompt and self._play_context.become_pass and sudoable:
|
||||
if self._play_context.prompt and sudoable:
|
||||
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)
|
||||
become_output = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue