diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-10 11:39:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:03 +0100 |
commit | bbc6e754e84115099722c78259868ee0e64bdc3c (patch) | |
tree | c4f386f62dbe0cf70353612cd48b06db38d92613 /bitbake/lib/bb/cache.py | |
parent | 7c44d883b432cbededb1e2620d3823e603fd25c0 (diff) | |
download | poky-bbc6e754e84115099722c78259868ee0e64bdc3c.tar.gz |
bitbake: toaster: get rid of using reduce
Replaced compicated calls of reduce with more clear code.
As reduce was removed from python 3 this change is mandatory
for the code to work on both pythons.
Here is an example change for illustration purposes:
original code:
querydict = dict(zip(or_keys, or_values))
query = reduce(operator.or_, map(lambda x: __get_q_for_val(x, querydict[x]), [k for k in querydict])))
replaced with:
query = None
for key, val in zip(or_keys, or_values):
x = __get_q_for_val(k, val)
query = query | x if query else x
[YOCTO #9584]
(Bitbake rev: 249d0bc6094ec9f369a02b78d8ed634a239e5ee4)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
0 files changed, 0 insertions, 0 deletions