parsing: treat locations without scheme as belonging to 'tree://'
This commit is contained in:
parent
077244e3b9
commit
6a59e740e4
3 changed files with 42 additions and 7 deletions
|
|
@ -77,11 +77,15 @@ def parse_location_into_parts(location: str, args: Dict) -> Tuple[str, str]:
|
|||
Parses the location URL to derive the corresponding root and url path.
|
||||
|
||||
Parameters:
|
||||
- location (str): The location URL to be parsed.
|
||||
- location (str): The location URL to be parsed. If the URL has no scheme,
|
||||
then 'tree://' is implied
|
||||
- args (Dict): A dictionary containing arguments including mounts and
|
||||
path information as passed by osbuild.api.arguments()
|
||||
"""
|
||||
|
||||
if "://" not in location:
|
||||
location = f"tree://{location}"
|
||||
|
||||
url = urlparse(location)
|
||||
|
||||
scheme = url.scheme
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue