From 0eee4765a4621cee3100d22a941a9c2742b628b2 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 19 Dec 2012 22:41:31 +0300 Subject: Cleanup replacement of sys.exitfunc with atexit (Python 2+) --- bin/scons-test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/scons-test.py b/bin/scons-test.py index 2191532c..046cf4b0 100644 --- a/bin/scons-test.py +++ b/bin/scons-test.py @@ -15,6 +15,7 @@ # so that problems on different platforms can be identified sooner. # +import atexit import getopt import imp import os @@ -74,7 +75,7 @@ if not os.path.exists(tempdir): import shutil os.chdir(startdir) shutil.rmtree(tempdir) - sys.exitfunc = cleanup + atexit.register(cleanup) # Fetch the input file if it happens to be across a network somewhere. # Ohmigod, does Python make this simple... -- cgit v1.2.1