summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-21 10:57:17 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:34 +0100
commite07a5b1909d26d6a28910002daf1c0ea21e05ea3 (patch)
tree3cdb17f1cfef6338c9025fe540747c4b6da43cef /bitbake/lib
parent66d66cb487aebc9c357be20cdfcef80c3714cfd0 (diff)
downloadopenembedded-core-e07a5b1909d26d6a28910002daf1c0ea21e05ea3.tar.gz
openembedded-core-e07a5b1909d26d6a28910002daf1c0ea21e05ea3.tar.bz2
openembedded-core-e07a5b1909d26d6a28910002daf1c0ea21e05ea3.tar.xz
openembedded-core-e07a5b1909d26d6a28910002daf1c0ea21e05ea3.zip
Simplify _findVar a bit
(Bitbake rev: b017acd39b811a00305002a8044e7d02e79f41d7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/data_smart.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 48f401618..01a333024 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -164,17 +164,14 @@ class DataSmart:
self.dict[var] = {}
def _findVar(self, var):
- _dest = self.dict
+ dest = self.dict
+ while dest:
+ if var in dest:
+ return dest[var]
- while (_dest and var not in _dest):
- if not "_data" in _dest:
- _dest = None
+ if "_data" not in dest:
break
- _dest = _dest["_data"]
-
- if _dest and var in _dest:
- return _dest[var]
- return None
+ dest = dest["_data"]
def _makeShadowCopy(self, var):
if var in self.dict: