mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
import_layers: fix URL construction
If you specified only the layer index URL and not the full API URL i.e. https://layers.openembedded.org then we put an extra slash in the URL which resulted in the request being redirected to the main page which breaks the request. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
b5892b0fdb
commit
e033154f4f
|
@ -73,7 +73,7 @@ def main():
|
||||||
if not layerindex_url.endswith('/'):
|
if not layerindex_url.endswith('/'):
|
||||||
layerindex_url += '/'
|
layerindex_url += '/'
|
||||||
if not '/layerindex/api/' in layerindex_url:
|
if not '/layerindex/api/' in layerindex_url:
|
||||||
layerindex_url += '/layerindex/api/'
|
layerindex_url += 'layerindex/api/'
|
||||||
|
|
||||||
rq = urllib.request.Request(layerindex_url)
|
rq = urllib.request.Request(layerindex_url)
|
||||||
data = urllib.request.urlopen(rq).read()
|
data = urllib.request.urlopen(rq).read()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user