Skip to content

Commit f57a584

Browse files
committed
use a more reliable way to delete the temporary directory with the launcher
1 parent 758f7c7 commit f57a584

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

graalpython/lib-python/3/venv/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ def create_if_needed(d):
140140
if sys.platform != "win32":
141141
os.chmod(script, 0o777)
142142

143-
atexit.register(lambda: os.unlink(script))
144-
atexit.register(lambda: os.rmdir(tempdir))
143+
atexit.register(lambda: shutil.rmtree(tempdir, ignore_errors=True))
145144

146145
dirname = context.python_dir = sys.graal_python_home
147146
exename = context.python_exe = "graalpython"

0 commit comments

Comments
 (0)