diff --git a/tools/osbuild-depsolve-dnf b/tools/osbuild-depsolve-dnf index dbffdb59..d652bfe2 100755 --- a/tools/osbuild-depsolve-dnf +++ b/tools/osbuild-depsolve-dnf @@ -326,7 +326,7 @@ def read_keys(paths, root_dir=None): for path in paths: url = urllib.parse.urlparse(path) if url.scheme == "file": - path = path.removeprefix("file://") + path = url.path path = modify_rootdir_path(path, root_dir) try: with open(path, mode="r", encoding="utf-8") as keyfile: diff --git a/tools/osbuild-depsolve-dnf5 b/tools/osbuild-depsolve-dnf5 index afac612e..8d3885a9 100755 --- a/tools/osbuild-depsolve-dnf5 +++ b/tools/osbuild-depsolve-dnf5 @@ -468,7 +468,7 @@ def read_keys(paths, root_dir=None): for path in paths: url = urllib.parse.urlparse(path) if url.scheme == "file": - path = path.removeprefix("file://") + path = url.path path = modify_rootdir_path(path, root_dir) try: with open(path, mode="r", encoding="utf-8") as keyfile: