Skip to content

Commit

Permalink
fix: [logarchive] change python 3.12 specific delete_on_close to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed Oct 1, 2024
1 parent c08ffe1 commit 17d10b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parsers/logarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parsers_logarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand All @@ -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)

Expand Down

0 comments on commit 17d10b8

Please sign in to comment.