diff --git a/kayobe/utils.py b/kayobe/utils.py index b70cb1029..ff4c35ca0 100644 --- a/kayobe/utils.py +++ b/kayobe/utils.py @@ -24,6 +24,8 @@ import shutil import subprocess import sys +from urllib.parse import unquote +from urllib.parse import urlparse from ansible.parsing.yaml.loader import AnsibleLoader import yaml @@ -67,7 +69,7 @@ def _get_direct_url_if_editable(dist): url = direct_url_content['url'] prefix = 'file://' if url.startswith(prefix): - return url[len(prefix):] + return unquote(urlparse(url).path) return None diff --git a/releasenotes/notes/fix-working-dir-url-encoding-5f50d66547858e37.yaml b/releasenotes/notes/fix-working-dir-url-encoding-5f50d66547858e37.yaml new file mode 100644 index 000000000..a7ed09bd2 --- /dev/null +++ b/releasenotes/notes/fix-working-dir-url-encoding-5f50d66547858e37.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes a issue where the working directory contains symbols such + as @. + The previous behaviour tries to load files with url encoded symbols. + `LP#2129687 `__