dolfinus commented on code in PR #158:
URL: https://github.com/apache/atlas/pull/158#discussion_r1217884091
##########
intg/src/main/python/apache_atlas/client/base_client.py:
##########
@@ -68,51 +68,36 @@ def call_api(self, api, response_type=None,
query_params=None, request_obj=None)
if request_obj is not None:
params['data'] = json.dumps(request_obj)
- if log.isEnabledFor(logging.DEBUG):
- log.debug("------------------------------------------------------")
- log.debug("Call : %s %s", api.method, path)
- log.debug("Content-type : %s", api.consumes)
- log.debug("Accept : %s", api.produces)
-
- response = None
-
- if api.method == HTTPMethod.GET:
- response = self.session.get(path, **params)
- elif api.method == HTTPMethod.POST:
- response = self.session.post(path, **params)
- elif api.method == HTTPMethod.PUT:
- response = self.session.put(path, **params)
- elif api.method == HTTPMethod.DELETE:
- response = self.session.delete(path, **params)
-
- if response is not None:
- log.debug("HTTP Status: %s", response.status_code)
-
- if response is None:
- return None
- elif response.status_code == api.expected_status:
+ log.debug("------------------------------------------------------")
+ log.debug("Call : %s %s", api.method, path)
+ log.debug("Content-type : %s", api.consumes)
+ log.debug("Accept : %s", api.produces)
+
+ method = HTTPMethod(api.method)
Review Comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]