community.general/lib/ansible/modules
Tim Rupp f48791e8bc Bugfix bigip_facts that was trying to check the length of an iterator (#2842)
Recently, a user reported that the bigip_facts module was failing with the error

    received exception: object of type 'itertools.imap' has no len()

This reported was occurring at line 1657 of the bigip_facts module

bug report is here

https://github.com/F5Networks/f5-ansible/issues/25

Upon further investigation, the map function for returning the specified
includes was returning an iterator, and calling len() on an iterator does
not work.

I believe this problem was caused by part of the Python 3.x effort insofar
as the inclusion of this line

https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/basic.py#L143

seems to affect our usage of map(), probably for the better anyway, and we need
to change our expectations in our module's code to no longer assume a list, but
instead assume an iterator.

After trawling through the module_utils/basic code, I think a list
comprehension is more appropriate here anyway, so I'm changing it to be
that. The affected user reported it works this way, and my own testing
on 2.2.0 supports that.
2016-12-08 11:34:47 -05:00
..
.github Update pull request template to provide context 2016-12-08 11:25:32 -05:00
cloud Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
commands Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
database Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
extras Bugfix bigip_facts that was trying to check the length of an iterator (#2842) 2016-12-08 11:34:47 -05:00
files Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
inventory Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
network Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
packaging Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
source_control Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
system Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
test/utils/shippable Simplify compileall checks. Remove py3 skip list. 2016-12-08 11:25:26 -05:00
utilities Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
web_infrastructure Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
windows Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00