normalise_file_path_to_url: use urlutils.pathname2url
Directly using urllib.pathname2url prevents this part of the code from working with Python 3. Change-Id: I9c0d295c321c1a16ef797efa856118fbd42ca950
This commit is contained in:
parent
448d303790
commit
42099da4b3
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
import urllib
|
|
||||||
|
|
||||||
from heatclient.common import environment_format
|
from heatclient.common import environment_format
|
||||||
from heatclient.common import template_format
|
from heatclient.common import template_format
|
||||||
@ -113,7 +112,7 @@ def normalise_file_path_to_url(path):
|
|||||||
if urlutils.urlparse(path).scheme:
|
if urlutils.urlparse(path).scheme:
|
||||||
return path
|
return path
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
return urlutils.urljoin('file:', urllib.pathname2url(path))
|
return urlutils.urljoin('file:', urlutils.pathname2url(path))
|
||||||
|
|
||||||
|
|
||||||
def process_environment_and_files(env_path=None, template=None,
|
def process_environment_and_files(env_path=None, template=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user