From: Jeff Layton Date: Tue, 16 Oct 2018 22:53:32 +0000 (-0400) Subject: mgr/rook: fix urljoin import X-Git-Tag: v14.1.0~1160^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=741850b05edeb89087a2eae6e9db5c367f20b728;p=ceph.git mgr/rook: fix urljoin import This is the correct syntax to ensure that we get urljoin, no matter the python version. Signed-off-by: Jeff Layton --- diff --git a/src/pybind/mgr/rook/rook_cluster.py b/src/pybind/mgr/rook/rook_cluster.py index 7095a24948c4..e3303408e604 100644 --- a/src/pybind/mgr/rook/rook_cluster.py +++ b/src/pybind/mgr/rook/rook_cluster.py @@ -7,7 +7,7 @@ call methods. This module is runnable outside of ceph-mgr, useful for testing. """ -from six.moves.urllib import parse +from six.moves.urllib.parse import urljoin # pylint: disable=import-error import logging import json @@ -74,7 +74,7 @@ class RookCluster(object): def rook_url(self, path): prefix = "/apis/ceph.rook.io/%s/namespaces/%s/" % ( ROOK_API_VERSION, self.rook_namespace) - return urlparse.urljoin(prefix, path) + return urljoin(prefix, path) def rook_api_call(self, verb, path, **kwargs): full_path = self.rook_url(path)