From 741850b05edeb89087a2eae6e9db5c367f20b728 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 16 Oct 2018 18:53:32 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/rook/rook_cluster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.47.3