From e033154f4f042a27bb7905d1571891bb5836e096 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 25 Jan 2019 16:16:11 +1300 Subject: [PATCH] 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 --- layerindex/tools/import_layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layerindex/tools/import_layers.py b/layerindex/tools/import_layers.py index b02759e..a341e0c 100755 --- a/layerindex/tools/import_layers.py +++ b/layerindex/tools/import_layers.py @@ -73,7 +73,7 @@ def main(): if not layerindex_url.endswith('/'): layerindex_url += '/' if not '/layerindex/api/' in layerindex_url: - layerindex_url += '/layerindex/api/' + layerindex_url += 'layerindex/api/' rq = urllib.request.Request(layerindex_url) data = urllib.request.urlopen(rq).read()