From c4b70aa098bab195a112134c863e095ef6cefc25 Mon Sep 17 00:00:00 2001 From: webrian Date: Mon, 5 Feb 2024 15:42:44 +0100 Subject: [PATCH 1/2] Update ilicache.py --- modelbaker/iliwrapper/ilicache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelbaker/iliwrapper/ilicache.py b/modelbaker/iliwrapper/ilicache.py index b08c09c..3981785 100644 --- a/modelbaker/iliwrapper/ilicache.py +++ b/modelbaker/iliwrapper/ilicache.py @@ -115,7 +115,7 @@ def download_repository(self, url): Downloads the informationfile (default: ilimodels.xml) and ilisite.xml files from the provided url and updates the local cache. """ - netloc = urllib.parse.urlsplit(url)[1] if not os.path.isdir(url) else url + netloc = "/".join([urllib.parse.urlsplit(url)[1], urllib.parse.urlsplit(url)[2]]) if not os.path.isdir(url) else url information_file_url = self.file_url(url, self.information_file) ilisite_url = self.file_url(url, "ilisite.xml") From 26f4387247873661ae28e18afa81be614325f05f Mon Sep 17 00:00:00 2001 From: webrian Date: Thu, 15 Feb 2024 12:25:06 +0100 Subject: [PATCH 2/2] Drop unneeded slash when composing repo URL --- modelbaker/iliwrapper/ilicache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modelbaker/iliwrapper/ilicache.py b/modelbaker/iliwrapper/ilicache.py index 3981785..50ee7c6 100644 --- a/modelbaker/iliwrapper/ilicache.py +++ b/modelbaker/iliwrapper/ilicache.py @@ -115,7 +115,8 @@ def download_repository(self, url): Downloads the informationfile (default: ilimodels.xml) and ilisite.xml files from the provided url and updates the local cache. """ - netloc = "/".join([urllib.parse.urlsplit(url)[1], urllib.parse.urlsplit(url)[2]]) if not os.path.isdir(url) else url + parsed_url = urllib.parse.urlparse(url) + netloc = parsed_url.netloc + parsed_url.path if not os.path.isdir(url) else url information_file_url = self.file_url(url, self.information_file) ilisite_url = self.file_url(url, "ilisite.xml")