diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-14 13:09:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-14 13:09:46 -0700 |
commit | 125f7513320e6516c594a8e6c5f7807f09267695 (patch) | |
tree | 1cdca4c1fc252c0e216fd6b658e4cf923025faa9 | |
parent | 0d3524b29e5e8718f80c51de4975f4c1e838d015 (diff) |
clean up emscripten temp dir
-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 |