Skip to content

Commit

Permalink
[SplunkPy] Fix An Issue with parse response (#28451)
Browse files Browse the repository at this point in the history
* fix an issue

* rn

* revert gitlab changed

* RN

* revert gitlab changed

* sdk words

* fix

* UD
  • Loading branch information
shmuel44 committed Jul 31, 2023
1 parent 91def37 commit 7f7d8cb
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 148 deletions.
9 changes: 3 additions & 6 deletions Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.py
Expand Up @@ -2053,11 +2053,8 @@ def parse_batch_of_results(current_batch_of_results, max_results_to_add, app):
batch_dbot_scores = []
results_reader = results.JSONResultsReader(io.BufferedReader(ResponseReaderWrapper(current_batch_of_results)))
for item in results_reader:
if isinstance(item, results.Message):
if "Error in" in item.message:
raise ValueError(item.message)
demisto.debug(f"Splunk-SDK message: {item.message}")
parsed_batch_results.append(convert_to_str(item.message))
if handle_message(item):
continue

elif isinstance(item, dict):
if demisto.get(item, 'host'):
Expand Down Expand Up @@ -2642,7 +2639,7 @@ def handle_message(item: results.Message | dict) -> bool:
"""
if isinstance(item, results.Message):
demisto.debug(f"Splunk-SDK message: {item.message}")
demisto.info(f"Splunk-SDK message: {item.message}")
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion Packs/SplunkPy/Integrations/SplunkPy/SplunkPy.yml
Expand Up @@ -626,7 +626,7 @@ script:
- contextPath: Splunk.UserMapping.SplunkUser
description: Splunk user mapping.
type: String
dockerimage: demisto/splunksdk-py3:1.0.0.66149
dockerimage: demisto/splunksdk-py3:1.0.0.66897
isfetch: true
ismappable: true
isremotesyncin: true
Expand Down

0 comments on commit 7f7d8cb

Please sign in to comment.