diff --git a/parsers/logarchive.py b/parsers/logarchive.py index 1ca4997..69a25a2 100644 --- a/parsers/logarchive.py +++ b/parsers/logarchive.py @@ -178,7 +178,7 @@ def parse_all_to_file(folders: list, output_file: str): temp_files = [] try: for folder in folders: - temp_file = tempfile.NamedTemporaryFile(delete_on_close=False) + temp_file = tempfile.NamedTemporaryFile(delete=False) LogarchiveParser.parse_folder_to_file(folder, temp_file.name) temp_files.append({ 'file': temp_file, diff --git a/tests/test_parsers_logarchive.py b/tests/test_parsers_logarchive.py index 662a5d9..0b733e3 100644 --- a/tests/test_parsers_logarchive.py +++ b/tests/test_parsers_logarchive.py @@ -151,7 +151,7 @@ def test_merge_files(self): try: # write the files with the test data for file in input: - temp_file = tempfile.NamedTemporaryFile(delete_on_close=False) + temp_file = tempfile.NamedTemporaryFile(delete=False) temp_files.append({ 'file': temp_file, }) @@ -160,7 +160,7 @@ def test_merge_files(self): temp_file.write(b'\n') temp_file.close() # merge the files - output_file = tempfile.NamedTemporaryFile(delete_on_close=False) + output_file = tempfile.NamedTemporaryFile(delete=False) output_file.close() LogarchiveParser.merge_files(temp_files, output_file.name)