From: Michael Tremer Date: Wed, 22 Jan 2025 17:05:07 +0000 (+0000) Subject: repos: Use os.path to compose URLs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd2eb9085cc9eb7651eb125747c5cea67cd187e;p=pbs.git repos: Use os.path to compose URLs Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/repos.py b/src/buildservice/repos.py index 5276922e..8b69c6ce 100644 --- a/src/buildservice/repos.py +++ b/src/buildservice/repos.py @@ -313,24 +313,24 @@ class Repo(database.Base, database.BackendMixin, database.SoftDeleteMixin): @property def download_url(self): - return "/".join(( + return os.path.join( self.backend.config.get("global", "baseurl", fallback="https://pakfire.ipfire.org"), "files", "repos", self.path, "%{arch}", - )) + ) @property def mirrorlist(self): - return "/".join(( + return os.path.join( self.backend.config.get("global", "baseurl", fallback="https://pakfire.ipfire.org"), "distros", self.distro.slug, "repos", self.slug, "mirrorlist?arch=%{arch}" - )) + ) def write_config(self, config, include_source=False, **kwargs): # Write the default configuration