diff options
-rw-r--r-- | tools/shared.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index ec3e8d09..3f0d89ec 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -1,4 +1,4 @@ -import shutil, time, os, sys, json, tempfile, copy, shlex +import shutil, time, os, sys, json, tempfile, copy, shlex, atexit from subprocess import Popen, PIPE, STDOUT from tempfile import mkstemp @@ -145,6 +145,9 @@ if os.environ.get('EMCC_DEBUG'): if not EMSCRIPTEN_TEMP_DIR: EMSCRIPTEN_TEMP_DIR = tempfile.mkdtemp(prefix='emscripten_temp_') + def clean_temp(): + try_delete(EMSCRIPTEN_TEMP_DIR) + atexit.register(clean_temp) # EM_CONFIG stuff |