Skip to content

Commit ac156f4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Account for encoding in _get_direct_url"
2 parents 2b87509 + 5eb4cbc commit ac156f4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

kayobe/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import shutil
2525
import subprocess
2626
import sys
27+
from urllib.parse import unquote
28+
from urllib.parse import urlparse
2729

2830
from ansible.parsing.yaml.loader import AnsibleLoader
2931
import yaml
@@ -67,7 +69,7 @@ def _get_direct_url_if_editable(dist):
6769
url = direct_url_content['url']
6870
prefix = 'file://'
6971
if url.startswith(prefix):
70-
return url[len(prefix):]
72+
return unquote(urlparse(url).path)
7173

7274
return None
7375

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes a issue where the working directory contains symbols such
5+
as @.
6+
The previous behaviour tries to load files with url encoded symbols.
7+
`LP#2129687 <https://bugs.launchpad.net/kayobe/+bug/2129687>`__

0 commit comments

Comments
 (0)