diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-13 11:39:13 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-13 11:39:13 +0100 |
commit | dcd312b9fbd902b7dc5f945a32f7c3db9bfd5fa9 (patch) | |
tree | 16f78dc4fdd24a70994bb17687fa59812783d0db /layerindex/models.py | |
parent | aa2c67c92dd4a9a2a37dc3ee3f18d72d9a29ef2a (diff) | |
download | openembedded-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.py | 3 |
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 |