From 1fc22bddf9de5c1b2db68b4a581d4cbf99af9842 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 28 Feb 2024 17:58:11 +0100 Subject: [PATCH] fix --- src/resolve_robotics_uri_py/resolve_robotics_uri_py.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py b/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py index 635a63f..507e82b 100644 --- a/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py +++ b/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py @@ -113,9 +113,8 @@ def resolve_robotics_uri(uri: str) -> pathlib.Path: msg = "resolve-robotics-uri-py: Passed URI '{}' use non-supported scheme '{}'" raise FileNotFoundError(msg.format(uri, parsed_uri.scheme)) - # Strip the URI scheme by keeping only the path prefixed with the netloc - uri_path = "" if parsed_uri.netloc == "" else f"{parsed_uri.netloc}/" - uri_path += parsed_uri.path + # Strip the URI scheme by keeping only the path prefixed with the optional netloc + uri_path = parsed_uri.netloc + parsed_uri.path # Process file:/ separately from the other schemes if parsed_uri.scheme == "file":