Browse Source

functools provide reduce instead of the ansible

The ansible 'reduce' function is itself imported from the functools:
https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/six/__init__.py#L273

And thus provides exactly the same functionality.
Furthermore, the functools is part of python lib since 2.7,
so the result should be compatible across all of our releases.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I981512fa81f0eb2aac0a50a4709c517cce794fa8
changes/17/795517/2
Jiri Podivin 3 days ago
parent
commit
ecc67950bb
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      validations_common/callback_plugins/validation_json.py
  2. +1
    -1
      validations_common/callback_plugins/validation_stdout.py

+ 1
- 1
validations_common/callback_plugins/validation_json.py View File

@ -19,8 +19,8 @@ import time
import os
from functools import partial
from functools import reduce
from ansible.module_utils.six.moves import reduce
from ansible.parsing.ajson import AnsibleJSONEncoder
from ansible.plugins.callback import CallbackBase


+ 1
- 1
validations_common/callback_plugins/validation_stdout.py View File

@ -16,7 +16,7 @@ __metaclass__ = type
import datetime
import os
from ansible.module_utils.six.moves import reduce
from functools import reduce
from ansible.plugins.callback import CallbackBase
DOCUMENTATION = '''


Loading…
Cancel
Save