Revert "fix(build): Use NamedTemporaryFile from mktemp"

This reverts commit 085290630e.
Breaks via https://github.com/frappe/frappe/pull/13145/checks?check_run_id=2573309928
This commit is contained in:
Gavin D'souza 2021-05-13 12:28:12 +05:30
parent 085290630e
commit 7930b84b71

View file

@ -5,7 +5,7 @@ import os
import re
import json
import shutil
from tempfile import NamedTemporaryFile, mkdtemp
from tempfile import mkdtemp, mktemp
from distutils.spawn import find_executable
import frappe
@ -161,8 +161,7 @@ def symlink(target, link_name, overwrite=False):
# Create link to target with temporary filename
while True:
# updated usage from mktemp to NamedTemporaryFile
temp_link_name = NamedTemporaryFile(dir=link_dir)
temp_link_name = mktemp(dir=link_dir)
# os.* functions mimic as closely as possible system functions
# The POSIX symlink() returns EEXIST if link_name already exists