Skip to content

Commit

Permalink
Updated code for sanity-checkall of CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashhar-24 committed Oct 31, 2023
1 parent d1df605 commit a08bea5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openage/util/fslike/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

from io import UnsupportedOperation, TextIOWrapper
import os
from typing import NoReturn

import tempfile
Expand Down Expand Up @@ -84,7 +85,9 @@ def __repr__(self):
def create_temp_file():
"""Function printing python version."""
# Create a temporary file using tempfile.NamedTemporaryFile
temp_file = tempfile.NamedTemporaryFile(delete=False)
temp_fd, temp_file = tempfile.mkstemp()
# Close the file descriptor to release resources
os.close(temp_fd)
# Wrap the temporary file path in a Path object and return it
path = Path(temp_file.name)
path.is_temp = True
Expand Down

0 comments on commit a08bea5

Please sign in to comment.