From ea0ffd8210bccdd3fe70005cd77ef4dea4a9ff31 Mon Sep 17 00:00:00 2001 From: Scott Odle Date: Mon, 25 Mar 2024 11:17:56 -0600 Subject: [PATCH] consistent variables --- f5bigipltm_connector.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/f5bigipltm_connector.py b/f5bigipltm_connector.py index 97fe529..f1832c4 100644 --- a/f5bigipltm_connector.py +++ b/f5bigipltm_connector.py @@ -112,9 +112,9 @@ def _process_json_response(self, r, action_result): message = "Error from server. Status Code: {0} Data from server: {1}".format( r.status_code, error_msg) except Exception as e: - _, error_msg = self._get_error_message_from_exception(e) + _, error_message = self._get_error_message_from_exception(e) message = "Unknown error occurred while processing the output response from the server. " \ - "Status Code: {0}. Data from server: {1}".format(r.status_code, error_msg) + "Status Code: {0}. Data from server: {1}".format(r.status_code, error_message) return RetVal(action_result.set_status(phantom.APP_ERROR, message), None) @@ -213,9 +213,9 @@ def _make_rest_call(self, endpoint, action_result, method="get", data=None, **kw try: url = "{}{}".format(self._base_url, endpoint) except Exception as e: - error_code, error_msg = self._get_error_message_from_exception(e) + error_code, error_message = self._get_error_message_from_exception(e) return RetVal(action_result.set_status(phantom.APP_ERROR, "Error occurred while creating the REST URL for the API call. " - "Error Code: {0}. Error Message: {1}".format(error_code, error_msg)), None) + "Error Code: {0}. Error Message: {1}".format(error_code, error_message)), None) try: r = request_func( @@ -225,9 +225,9 @@ def _make_rest_call(self, endpoint, action_result, method="get", data=None, **kw data=data, **kwargs) except Exception as e: - error_code, error_msg = self._get_error_message_from_exception(e) + error_code, error_message = self._get_error_message_from_exception(e) return RetVal(action_result.set_status(phantom.APP_ERROR, "Error occurred while making the REST call to the F5 server. " - "Error Code: {0}. Error Message: {1}".format(error_code, error_msg)), None) + "Error Code: {0}. Error Message: {1}".format(error_code, error_message)), None) return self._process_response(r, action_result)