Skip to content

Commit

Permalink
Fix naming consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
sodle-splunk committed Dec 4, 2023
1 parent f4b3ea1 commit 6c4ba9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions winrm_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _run_cmd(self, action_result, cmd, args=None, parse_callback=pc.basic,
else:
resp = self._session.run_cmd(cmd, args)
except UnicodeDecodeError:
return action_result.set_status(phantom.APP_ERROR, "Error running command: {}".format(consts.WINRM_UNICODE_ERR_MESSAGE))
return action_result.set_status(phantom.APP_ERROR, "Error running command: {}".format(consts.WINRM_UNICODE_ERR_MSG))
except Exception as e:
return action_result.set_status(phantom.APP_ERROR,
"Error running command: {}".format(unquote(self._get_error_message_from_exception(e))))
Expand Down Expand Up @@ -372,7 +372,7 @@ def _run_ps(self, action_result, script, parse_callback=pc.basic, additional_dat
script = UnicodeDammit(script).unicode_markup
resp = self._session.run_ps(script)
except UnicodeDecodeError:
return action_result.set_status(phantom.APP_ERROR, "Error running PowerShell script: {}".format(consts.WINRM_UNICODE_ERR_MESSAGE))
return action_result.set_status(phantom.APP_ERROR, "Error running PowerShell script: {}".format(consts.WINRM_UNICODE_ERR_MSG))
except Exception as e:
return action_result.set_status(phantom.APP_ERROR,
"Error running PowerShell script: {}".format(self._get_error_message_from_exception(e)))
Expand Down
2 changes: 1 addition & 1 deletion winrm_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
[Convert]::ToBase64String([IO.File]::ReadAllBytes($d))
"""

WINRM_UNICODE_ERR_MESSAGE = "Invalid unicode detected"
WINRM_UNICODE_ERR_MSG = "Invalid unicode detected"

# Constants relating to '_validate_integer'
WINRM_ERR_INVALID_INT = 'Please provide a valid {msg} integer value in the "{param}"'
Expand Down

0 comments on commit 6c4ba9e

Please sign in to comment.