bitbake: data_smart: Add explict None checks
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 16 Sep 2013 07:40:20 +0000 (07:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Sep 2013 13:11:04 +0000 (14:11 +0100)
commit0fa755a1cfb055f5c7dfb1cb86d42d5684d2611f
tree760ea8d90ed8977ef485d825df37e543dd7dbeba
parent3c08eda0250e570d1038c5df16de1509aaf581d4
bitbake: data_smart: Add explict None checks

Simple if xxx checks end up calling len(xxx). We're interested in the specific case
of None which means we can break out the iterator much earlier after the first
item. This adds in the specific tests for None in what is a hot path in the
data store code which gives small performance gains.

(Bitbake rev: a4d81e44a7cd3dafb0bf12f7cac5ff511db18e60)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/data_smart.py