mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Fix expect for python 3 (#24912)
* Fix expect for python 3 - Change generator next to python 3 compatible - Added tests for expect * Add pexpect to integration.txt - add pexpect library to requirements for integration tests * Use ansible_python_interpreter in integration tests for expect * Use double-quotes for expect integration tests * Cast user input to string for expect integration tests * Cast user input to string earlier in expect integration tests * Use ansible.module_utils.six.moves input for expect integration tests * Fix yamllint errors in the expect test * Use cat to trigger timeout for expect integration tests * Use realpath filter in expect integration tests
This commit is contained in:
parent
66355df917
commit
daada2000c
6 changed files with 103 additions and 1 deletions
|
@ -116,7 +116,7 @@ def response_closure(module, question, responses):
|
|||
|
||||
def wrapped(info):
|
||||
try:
|
||||
return resp_gen.next()
|
||||
return next(resp_gen)
|
||||
except StopIteration:
|
||||
module.fail_json(msg="No remaining responses for '%s', "
|
||||
"output was '%s'" %
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue