Skip to content

Commit

Permalink
Fix issue splunk-soar-connectors#12 byte-based instead of text based
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlodHolt committed Feb 9, 2024
1 parent a5e23f2 commit a5cd9a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _file_interaction(self, action_result, action, file_path, contents='', vault

try:
vault_file_path = Path(list(vault_file_info)[0].get('path'))
vault_file_data = vault_file_path.read_text()
vault_file_data = vault_file_path.read_bytes()
except Exception as e:
self.debug_print(f'Exception : {e}')
return action_result.set_status(phantom.APP_ERROR)
Expand All @@ -268,7 +268,7 @@ def _file_interaction(self, action_result, action, file_path, contents='', vault
full_path.parent.mkdir(parents=True, exist_ok=True)

# overwrite file into local disk
full_path.write_text(file_data)
full_path.write_bytes(file_data)

# add into index
repo.index.add(file_path)
Expand Down

0 comments on commit a5cd9a4

Please sign in to comment.