summaryrefslogtreecommitdiffstats
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
parent66d66cb487aebc9c357be20cdfcef80c3714cfd0 (diff)
downloadpoky-e07a5b1909d26d6a28910002daf1c0ea21e05ea3.tar.gz
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>
-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 48f4016180..01a3330245 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -164,17 +164,14 @@ class DataSmart:
164 self.dict[var] = {} 164 self.dict[var] = {}
165 165
166 def _findVar(self, var): 166 def _findVar(self, var):
167 _dest = self.dict 167 dest = self.dict
168 while dest:
169 if var in dest:
170 return dest[var]
168 171
169 while (_dest and var not in _dest): 172 if "_data" not in dest:
170 if not "_data" in _dest:
171 _dest = None
172 break 173 break
173 _dest = _dest["_data"] 174 dest = dest["_data"]
174
175 if _dest and var in _dest:
176 return _dest[var]
177 return None
178 175
179 def _makeShadowCopy(self, var): 176 def _makeShadowCopy(self, var):
180 if var in self.dict: 177 if var in self.dict: