Skip to content

Commit

Permalink
Fix grammarly
Browse files Browse the repository at this point in the history
  • Loading branch information
achandya-crest committed Nov 9, 2023
1 parent e6d0af4 commit 7e11ca7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions servicenow_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def _get_error_details(self, resp_json):

return error_details

def _process_empty_reponse(self, response, action_result):
def _process_empty_response(self, response, action_result):

# this function will parse the header and create the response that the callers
# of the app expect
Expand Down Expand Up @@ -374,12 +374,12 @@ def _process_response(self, r, action_result):
if 'html' in r.headers.get('Content-Type', ''):
return self._process_html_response(r, action_result)

# it's not an html or json, handle if it is a successfull empty reponse
# it's not an html or json, handle if it is a successfull empty response
if (200 <= r.status_code < 205) and (not r.text):
return self._process_empty_reponse(r, action_result)
return self._process_empty_response(r, action_result)

# everything else is actually an error at this point
message = "Can't process resonse from server. Status Code: {0} Data from server: {1}".format(
message = "Can't process response from server. Status Code: {0} Data from server: {1}".format(
r.status_code, r.text.replace('{', ' ').replace('}', ' '))

return RetVal(action_result.set_status(phantom.APP_ERROR, message), None)
Expand Down Expand Up @@ -709,7 +709,7 @@ def _create_ticket(self, param):
desc = param.get(SERVICENOW_JSON_DESCRIPTION)

if (not fields) and (not short_desc) and (SERVICENOW_JSON_DESCRIPTION not in param):
return action_result.set_status(phantom.APP_ERROR, SERVICENOW_ERR_ONE_PARAM_REQ)
return action_result.set_status(phantom.APP_ERROR, SERVICENOW_ERROR_ONE_PARAM_REQ)

if short_desc:
data.update({'short_description': short_desc.replace(
Expand Down Expand Up @@ -2026,7 +2026,7 @@ def handle_action(self, param):
verify=verify, data=data, headers=headers)
session_id = r2.cookies['sessionid']
except Exception as e:
print("Unable to get session id from the platfrom. Error: {}".format(str(e)))
print("Unable to get session id from the platform. Error: {}".format(str(e)))
sys.exit(1)

with open(args.input_test_json) as f:
Expand Down

0 comments on commit 7e11ca7

Please sign in to comment.