diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-12-07 15:23:36 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-12-07 15:23:36 +0000 |
| commit | fdd920eac4a57ac9faa54605d849349ce19ae6f4 (patch) | |
| tree | ab7139ffc1aeb47e55c218849f19749dfdecabd5 /docker/base/set_configs.py | |
| parent | 0183dd9e61dd6ddc61c13ea6e373936cd0d031fd (diff) | |
| parent | dab8cae9b27a80cb512eac88076a0cdbf434618c (diff) | |
| download | kolla-fdd920eac4a57ac9faa54605d849349ce19ae6f4.tar.gz kolla-fdd920eac4a57ac9faa54605d849349ce19ae6f4.zip | |
Merge "Add Python 3.x support in set_configs.py"
Diffstat (limited to 'docker/base/set_configs.py')
| -rw-r--r-- | docker/base/set_configs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index b567e385d..de28c6888 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -19,10 +19,10 @@ import os from pwd import getpwnam import shutil import sys -import urlparse from kazoo import client as kz_client from kazoo import exceptions as kz_exceptions +from six.moves.urllib import parse # TODO(rhallisey): add docstring. @@ -85,7 +85,7 @@ def zk_connection(url): zk_hosts = os.environ.get("KOLLA_ZK_HOSTS") if zk_hosts is None: - components = urlparse.urlparse(url) + components = parse.urlparse(url) zk_hosts = components.netloc zk = kz_client.KazooClient(hosts=zk_hosts) zk.start() @@ -97,7 +97,7 @@ def zk_connection(url): def zk_path_exists(zk, path): try: - components = urlparse.urlparse(path) + components = parse.urlparse(path) zk.get(components.path) return True except kz_exceptions.NoNodeError: @@ -141,7 +141,7 @@ def copy_files(data): if is_zk_transport(source): with zk_connection(source) as zk: - components = urlparse.urlparse(source) + components = parse.urlparse(source) return zk_copy_tree(zk, components.path, dest) if os.path.isdir(source): |
