Skip to content

Commit

Permalink
Update turbinia-api-client calls (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarontp authored Oct 9, 2023
1 parent f726393 commit 8c7471a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dftimewolf/lib/processors/turbinia_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def DownloadFilesFromAPI(self, task_data: Dict[str, List[str]],
self.client)
try:
task_id = task_data.get('id')
api_response = api_instance.get_task_output(
api_response = api_instance.get_task_output_with_http_info(
task_id, _preload_content=False)
filename = f'{task_id}-'

Expand All @@ -180,8 +180,7 @@ def DownloadFilesFromAPI(self, task_data: Dict[str, List[str]],
local_path = file.name
self.logger.info(f'Downloading output for task {task_id} to {local_path}')
# Read the response and write to the file.
for chunk in api_response.read_chunked():
file.write(chunk)
file.write(api_response.raw_data)
file.close()

# Extract the files from the tgz file.
Expand Down

0 comments on commit 8c7471a

Please sign in to comment.