[elbe-devel] [PATCH] Remove duplicated slashes from primary mirror
Braunwarth, Daniel
Daniel.Braunwarth at kuka.com
Wed Jun 9 13:32:12 CEST 2021
This patch removes any duplicated slashes in the primary mirror URL.
This patch fixes #272.
Signed-off-by: Daniel Braunwarth <daniel.braunwarth at kuka.com>
---
elbepack/debinstaller.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/debinstaller.py b/elbepack/debinstaller.py
index d880e5e34..7d4c5dc21 100644
--- a/elbepack/debinstaller.py
+++ b/elbepack/debinstaller.py
@@ -196,8 +196,8 @@ def get_primary_mirror(prj):
m = prj.node("mirror")
mirror = m.text("primary_proto") + "://"
- mirror += m.text("primary_host") + "/"
- mirror += m.text("primary_path")
+ mirror += f"{m.text('primary_host')}/{m.text('primary_path')}" \
+ .replace("//", "/")
else:
raise NoKinitrdException("Broken xml file: "
"no cdrom and no primary host")
--
2.32.0
More information about the elbe-devel
mailing list