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
This commit is contained in:
parent
f4c7f00120
commit
ecc67950bb
validations_common/callback_plugins
@ -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
|
||||
|
||||
|
@ -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…
x
Reference in New Issue
Block a user