]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: fix urljoin import 24626/head
authorJeff Layton <jlayton@redhat.com>
Tue, 16 Oct 2018 22:53:32 +0000 (18:53 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 17 Oct 2018 14:26:41 +0000 (10:26 -0400)
This is the correct syntax to ensure that we get urljoin, no matter
the python version.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/pybind/mgr/rook/rook_cluster.py

index 7095a24948c4bf528bc00b2aa83f82477b4a9757..e3303408e604dfd0668498de98f867b74d4f05b8 100644 (file)
@@ -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)