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:
Cyril Roelandt 2014-02-12 02:11:57 +01:00
parent 448d303790
commit 42099da4b3

View File

@ -15,7 +15,6 @@
import os
import six
import urllib
from heatclient.common import environment_format
from heatclient.common import template_format
@ -113,7 +112,7 @@ def normalise_file_path_to_url(path):
if urlutils.urlparse(path).scheme:
return 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,