This is an automated email from the ASF dual-hosted git repository. madhan pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 956cac4b783741f4db93ce9bbeea99c6e49e2806 Author: Dov Benyomin Sohacheski <b@kloud.email> AuthorDate: Wed Oct 19 08:44:00 2022 +0300 ATLAS-4704: Remove os.path.join causing incorrect windows path Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit b9ff08fee7646f10083da2f8672b932a34aa4a7f) --- intg/src/main/python/apache_atlas/client/base_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intg/src/main/python/apache_atlas/client/base_client.py b/intg/src/main/python/apache_atlas/client/base_client.py index 2402611ce..bd52660e3 100644 --- a/intg/src/main/python/apache_atlas/client/base_client.py +++ b/intg/src/main/python/apache_atlas/client/base_client.py @@ -18,9 +18,9 @@ import copy import json import logging -import os from requests import Session +from urllib.parse import urljoin from apache_atlas.client.admin import AdminClient from apache_atlas.client.discovery import DiscoveryClient @@ -42,7 +42,7 @@ class AtlasClient: session = Session() session.auth = auth - self.host = host + self.host = host.rstrip('/') self.session = session self.request_params = {'headers': {}} self.typedef = TypeDefClient(self) @@ -57,7 +57,7 @@ class AtlasClient: def call_api(self, api, response_type=None, query_params=None, request_obj=None): params = copy.deepcopy(self.request_params) - path = os.path.join(self.host, api.path) + path = urljoin(self.host, api.path.lstrip('/')) params['headers']['Accept'] = api.consumes params['headers']['Content-type'] = api.produces