mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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'" %
|
||||
|
||||
Reference in New Issue
Block a user