From 8c7471ad8e56a453927ceca148ba334c01b8d2cd Mon Sep 17 00:00:00 2001 From: Aaron Peterson Date: Mon, 9 Oct 2023 07:01:18 -0700 Subject: [PATCH] Update turbinia-api-client calls (#790) --- dftimewolf/lib/processors/turbinia_base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dftimewolf/lib/processors/turbinia_base.py b/dftimewolf/lib/processors/turbinia_base.py index 0f7f3e7a9..4fd3ca0e8 100644 --- a/dftimewolf/lib/processors/turbinia_base.py +++ b/dftimewolf/lib/processors/turbinia_base.py @@ -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}-' @@ -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.