diff --git a/tests/ansible/lib/modules/custom_python_detect_environment.py b/tests/ansible/lib/modules/custom_python_detect_environment.py index 2da9cddf..9f628a03 100644 --- a/tests/ansible/lib/modules/custom_python_detect_environment.py +++ b/tests/ansible/lib/modules/custom_python_detect_environment.py @@ -12,6 +12,17 @@ import socket import sys +try: + all +except NameError: + # Python 2.4 + def all(it): + for elem in it: + if not elem: + return False + return True + + def main(): module = AnsibleModule(argument_spec={}) module.exit_json(