summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-10 11:39:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:03 +0100
commitbbc6e754e84115099722c78259868ee0e64bdc3c (patch)
treec4f386f62dbe0cf70353612cd48b06db38d92613 /bitbake/lib/bb/utils.py
parent7c44d883b432cbededb1e2620d3823e603fd25c0 (diff)
downloadpoky-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/utils.py')
0 files changed, 0 insertions, 0 deletions