From 685d3a31e078479bcb2e68087ca74359e3682ca2 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 14 Jul 2024 20:02:56 +0200 Subject: [PATCH] project,projects --- spcd/project.py | 5 +++-- spcd/projects.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spcd/project.py b/spcd/project.py index 7017d66..f45303e 100644 --- a/spcd/project.py +++ b/spcd/project.py @@ -4,7 +4,8 @@ from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING -from urllib.parse import urljoin + +from spcd.util import add_url_path if TYPE_CHECKING: from spcd.projects import Projects @@ -39,7 +40,7 @@ class Project: if value := projects.environment.get(variable, None): self.root = value # url - self.url = urljoin(projects.url, self.name) + self.url = add_url_path(projects.url, self.name) def __str__(self: Project) -> str: return f"""\ diff --git a/spcd/projects.py b/spcd/projects.py index e5dd41c..ca5d9e1 100644 --- a/spcd/projects.py +++ b/spcd/projects.py @@ -4,7 +4,8 @@ from __future__ import annotations import os from pathlib import Path -from urllib.parse import urljoin + +from spcd.util import add_url_path GROUP_AND_NAME = [ "GITHUB_REPOSITORY", @@ -28,7 +29,7 @@ class Projects: # url for variable in SERVER_URL: if value := self.environment.get(variable, None): - self.url = urljoin(value, self.group) + self.url = add_url_path(value, self.group) def __str__(self: Projects) -> str: return f"""\