tests/run-tests.py
changeset 14971 0b21ae0a2366
parent 14867 b601b9eb372d
child 15236 4fae5df4b1bb
--- a/tests/run-tests.py	Mon Jul 25 16:05:01 2011 -0500
+++ b/tests/run-tests.py	Mon Jul 25 16:37:18 2011 -0500
@@ -340,10 +340,7 @@
     """Terminate subprocess (with fallback for Python versions < 2.6)"""
     vlog('# Terminating process %d' % proc.pid)
     try:
-        if hasattr(proc, 'terminate'):
-            proc.terminate()
-        else:
-            os.kill(proc.pid, signal.SIGTERM)
+        getattr(proc, 'terminate', lambda : os.kill(proc.pid, signal.SIGTERM))()
     except OSError:
         pass