aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-01-16 11:06:58 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-01-16 13:08:18 +1300
commita2dbda94693b89af1b014584c4d2106001d1741f (patch)
tree4723ab94a36c88b50d6abce922fadec2c783f15a /layerindex/update.py
parenta5a3c47b694a661566b5fe64d5e7723365c26c92 (diff)
downloadopenembedded-core-contrib-a2dbda94693b89af1b014584c4d2106001d1741f.tar.gz
update: only get branch object once per branch
A minor optimisation - it's not going to change between layers so get it in the branch loop. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 9529371c21..ebb0e3489e 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -200,6 +200,7 @@ def main():
# they never get used during normal operation).
last_rev = {}
for branch in branches:
+ branchobj = utils.get_branch(branch)
for layer in layerquery:
layerupdate = LayerUpdate()
layerupdate.update = update
@@ -220,8 +221,6 @@ def main():
urldir = layer.get_fetch_dir()
repodir = os.path.join(fetchdir, urldir)
- branchobj = utils.get_branch(branch)
-
if branchobj.update_environment:
cmdprefix = branchobj.update_environment.get_command()
else: