aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/models.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-13 11:39:13 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-13 11:39:13 +0100
commitdcd312b9fbd902b7dc5f945a32f7c3db9bfd5fa9 (patch)
tree16f78dc4fdd24a70994bb17687fa59812783d0db /layerindex/models.py
parentaa2c67c92dd4a9a2a37dc3ee3f18d72d9a29ef2a (diff)
downloadopenembedded-core-contrib-dcd312b9fbd902b7dc5f945a32f7c3db9bfd5fa9.tar.gz
Fix tree link on layer list for layers with no subdirectory
We always need to replace %path% in the URL, not just when there is a non-blank path to replace it with. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/models.py')
-rw-r--r--layerindex/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/layerindex/models.py b/layerindex/models.py
index 5e38285eda..e1a9edda8a 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -143,10 +143,9 @@ class LayerBranch(models.Model):
if '%path%' in base_url:
if extra_path:
url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '\\1', url)
- return url.replace('%path%', extra_path)
else:
url = re.sub(r'\[([^\]]*%path%[^\]]*)\]', '', url)
- return url
+ return url.replace('%path%', extra_path)
else:
return url + extra_path
return None