From 462a8567e5a9ba7ebb288190fe186bcb64f74461 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: add all() polyfill to custom_python_detect_environmnet --- .../lib/modules/custom_python_detect_environment.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(