diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 3f5e3d8682..df538f1490 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -113,9 +113,8 @@ def _get_endpoint_url(request, endpoint_type, catalog=None): # TODO(gabriel): When the Service Catalog no longer contains API versions # in the endpoints this can be removed. - bits = urlparse.urlparse(url) - root = "://".join((bits.scheme, bits.netloc)) - url = "%s/v%s" % (root, VERSIONS.active) + url = url.rstrip('/') + url = urlparse.urljoin(url, 'v%s' % VERSIONS.active) return url